Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conditional log based on ms value (or any other custom logic) #885

Closed
axyz opened this issue Apr 15, 2022 · 1 comment
Closed

conditional log based on ms value (or any other custom logic) #885

axyz opened this issue Apr 15, 2022 · 1 comment
Labels
question This issue asks a question or requests usage support

Comments

@axyz
Copy link

axyz commented Apr 15, 2022

Hi, was wondering if it is possible to only show logs for events that take more than X ms, that would be helpful to identify bottlenecks in an application with many log points and eventually namespace such logger as app:perf for example.

I was thinking that could be done with a custom formatter, but quickly looking at the code it seems that the the new line is always inlcuded.

Maybe I'm missing something and there is a better way to achieve that, or is it a use case that was never considered?

@Qix-
Copy link
Member

Qix- commented Apr 16, 2022

This would be a case for #556. No estimate on when it'll be ready though, unfortunately. Right now you'd have to override the .log function to handle that logic yourself, which I know isn't ideal.

Going to close in favor of the linked issue, let me know if I can answer any more questions.

@Qix- Qix- closed this as completed Apr 16, 2022
@Qix- Qix- added the question This issue asks a question or requests usage support label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This issue asks a question or requests usage support
Development

No branches or pull requests

2 participants