Comments (4)
I read this https://github.com/gabime/spdlog/wiki/7.-Flush-policy and my doubts are: is flush_every() mandatory? Can it be replaced by flush_on and obtain the same result and performance?
from spdlog.
flush_every()
is used when you want to write logs to disk periodically.
It should be used for applications that do not write logs very often.
Consider that it is not to be used as a reason for performance.
from spdlog.
By the way, the choice between flushing from threads by flush_every()
and frequent flushes by flush_on()
should depend on machine performance.
On a machine with slow disk I/O, frequent log writes to disk by flush_on()
will slow down the throughput of the application.
In such a case, flushing to dedicated thread (flush_every()
thread) should improve the throughput of the application.
from spdlog.
thanks!
from spdlog.
Related Issues (20)
- Logging messages within a custom sink causes a dead lock? HOT 1
- does SPDLOG consider control characters encountered when printing a character array as string termination markers? HOT 1
- Set a log zone prefix to default logger HOT 2
- Memory overflow warning in pattern_formatter-inl.h HOT 1
- Is there a plan to update the included libfmt to fix fmtlib/fmt#3540? HOT 8
- C++20 Modules "'std::basic_string': redefinition" HOT 2
- Make source_loc more resilient to invalid data HOT 3
- Show the lower digits of numeric fields, such as thread-id HOT 2
- spdlog::init_thread_pool caused a Segmentation fault HOT 4
- Auto generate tweakme.h HOT 17
- Can't create directory and file like "D:/Logs/log.txt" HOT 14
- Header-only version 1.14.0 complie with errors HOT 6
- spdlog 1.14.0: undefined reference to `spdlog::get(char const*)' HOT 14
- vs编译工作正常, g++编译报错 HOT 5
- Async logging using MDC HOT 6
- Does the dist_sink support Factory pattern to create a new logger? HOT 3
- COMBINE "daily_file_sink" AND "rotating_file_sink" HOT 2
- How register work? HOT 3
- Does SPDLOG support conditional logging? HOT 6
- solution : "rotating_file_sink: failed renaming: permission denied " HOT 1
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 spdlog.