Comments (3)
Hello, shi-yan.
It is currently not possible to output each thread’s log messages to a different log file. However, each log message is tagged with a NanoLog-assigned thread identifier that you might be able to use for your post-processing.
To switch log files, you can use the NanoLog::setLogFile(char*) API defined in runtime/NanoLog.h.
from nanolog.
Thank you very much!
One more question, when logs from multiple threads are mixed in one file, threads won't interference with each other, right? For example, when using std::cout from multiple threads, I will see messed-up log outputs that are formed by logs from a few threads mixed together .
from nanolog.
That is correct! When multiple threads log to the same file, there will only be a single log message per line.
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.