Closed rohitjoshi closed 3 years ago
Ad 1: Compile time filters are provided by the log
crate into which flexi_logger
'plugs' in. See https://docs.rs/log/0.4.11/log/#compile-time-filters .
Ad 2: I added an option use_buffering (see https://docs.rs/flexi_logger/0.17.0/flexi_logger/struct.Logger.html#method.use_buffering) with version 0.17; would be great if you could try it out and let me know if this helps already far enough. I also started to experiment with crossbeam channels, but didn't see a big enough difference yet (but this may be platform specific).
I will try it out and let you know. Thank you 🙏
With buffering, it would be good to implement auto flush timer so buffered output will be written to log. Eg. Nginx allows configurable buffer size and flush interval http://nginx.org/en/docs/stream/ngx_stream_log_module.html#access_log
Is implemented with 0.17.1; see https://docs.rs/flexi_logger/0.17.1/flexi_logger/struct.Logger.html#method.buffer_and_flush or https://docs.rs/flexi_logger/0.17.1/flexi_logger/struct.Logger.html#method.buffer_and_flush_with
Thanks for the proposal!!
I switch from slog_async to flexi_logger and lost ~20% throughput. The log level is set to info and less than 10 lines are logged per second. Any reason for this performance drop?
I suspect few things but please help me here.
but this is not supported by flexi_logger. I did use log level features as below.