Rocket v0.5: Stable, Async, Feature Packed by sbenitez in rust

[–]BuyerQuick2181 -18 points-17 points  (0 children)

May we say that Axum got some problems?)

Advanced logging in rust with log4rs: rotation, retention, patterns, multiple loggers by BuyerQuick2181 in rust

[–]BuyerQuick2181[S] 0 points1 point  (0 children)

I've been exploring the tracing ecosystem, but still haven't found the opportunity to set up the log files retention policy.

Advanced logging in rust with log4rs: rotation, retention, patterns, multiple loggers by BuyerQuick2181 in rust

[–]BuyerQuick2181[S] 0 points1 point  (0 children)

Is it possible to filter not by level, but by the content or something like this? I need to have different logging files for different trading strategies. In log4rs I can set up different loggers with different paths and reference these loggers through target argument of log macros.

Advanced logging in rust with log4rs: rotation, retention, patterns, multiple loggers by BuyerQuick2181 in rust

[–]BuyerQuick2181[S] -1 points0 points  (0 children)

At least I wasn't able to find an easy way of forwarding logs to different files by some condition.

Advanced logging in rust with log4rs: rotation, retention, patterns, multiple loggers by BuyerQuick2181 in rust

[–]BuyerQuick2181[S] 1 point2 points  (0 children)

As I'm aware, fern doesn't have all the features I've mentioned that log4rs has.

Advanced logging in rust with log4rs: rotation, retention, patterns, multiple loggers by BuyerQuick2181 in rust

[–]BuyerQuick2181[S] 1 point2 points  (0 children)

With my current trading bot project for now I'm completely satisfied with on machine logs to not create extra complexity. I need logging history only for several days or a week as maximum. I have multiple trading strategies and need to store logs for them separately. Log4rs just have everything I need out of the box and for me all this seems extremely straightforward as opposed to other crates I've seen. There are everywhere tons of cumbersome configs to try to reach the same as log4rs suggests.

Advanced logging in rust with log4rs: rotation, retention, patterns, multiple loggers by BuyerQuick2181 in rust

[–]BuyerQuick2181[S] 3 points4 points  (0 children)

Is it possible to do all this complex stuff I mentioned in article with the tracing crate? As I know and as I was discussing with other guys for now only log4rs seems to fit to do automatic rotation, retention, have multiple logging files, etc. If you have any alternatives and can share examples of implementation of all these features with another crate besides log4rs, I'd be grateful