|
Thanks for your great work of logforth, I used this into the storage service. if logforth is used in the production environment, sometimes we want to temporarily adjust the log level to print out some logs for digging. Is this possible to support this in logforth? |
Answered by
tisonkun
Jan 3, 2025
Replies: 1 comment
For this purpose, in our use case, we typically use the RUST_LOG="debug" ./your/app
# or
RUST_LOG="info,specific_mod=debug" ./your/appThis follows the most common used env_filter If you'd like to use more dynamic rules, you can use the CustomFilter for define your rules, and even with a global state to check so that you can modify it at runtime. I'm glad to hear your concrete use case and see if we can integrate it at the upstream. |
0 replies
Answer selected by
tisonkun
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For this purpose, in our use case, we typically use the
RUST_LOGenv to enable debug level logs, like:This follows the most common used env_filter
If you'd like to use more dynamic rules, you can use the CustomFilter for define your rules, and even with a global state to check so that you can modify it at runtime.
I'm glad to hear your concrete use case and see if we can integrate it at the upstream.