Comments (2)
Actually, this is intended behavior. A lone “%” is typically undefined behavior in most printf implementations.
If you enable -Wformat
or -Wall
in your compiler, you should see that a lone ‘%’ will result in warnings. You can execute an example here: http://cpp.sh/8lozo . If you click 'Run' and look at the 'compilation' tab, you should see the following warnings:
In function 'int main()':
8:27: warning: unknown conversion type character 'W' in format [-Wformat=]
9:15: warning: spurious trailing '%' in format [-Wformat=]
To print a single percent sign by itself, you have to escape it with another percent. Example: NANO_LOG(ERROR, “100%% True”);
from nanolog.
I see! Thanks for explanation (also a good lesson on my C++ basics! 👍 )
from nanolog.
Related Issues (20)
- Any suggestion to improve NanoLog type safety? HOT 5
- Add a switch to enable log output to stdout.
- Add a macro switch for a more convenient uncompressed output.
- Try std::string_view instead
- Performance
- No conan or vcpkg integration
- Online decompressor HOT 1
- ability to file swap
- Having a background text file writer instead of the compressor with binary log writer
- Infinite Loop in Makefile Dependency Generation
- Write to multiple log files.
- Capability of file rolling
- Run into "Internal Error: Corrupted BufferExtend"
- Can I build a python wrap for nanolog?
- system level use of nanlog?
- windows support
- Memory leak in NanoLog?
- arm64 Support
- No updates since 3 years ago HOT 1
- is there a Rust equivalent of this package?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanolog.