-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Configuring logging #461
Comments
@kbrah Hi there! Your Timbre config looks correct, I suspect that the issue is that you may want to use merge-config! rather than with-merged-config. The "with-x" utils all establish a binding that's only relevant for the specific enclosed body. Hopefully that helps / makes sense? BTW I'm expecting to switch Sente from Timbre to tools.logging in a future release. |
Thanks for the reply! I tried the Do you have any timeline estimate for when the transition to tools.logging would be implemented? Currently our solution is to just redirect stderr to /dev/null to avoid producing a huge amount of log lines. That should be fine except now the exception is not visible in our logs at all. (Normally Logback will output everything to stdout as far as I understand). |
Could you show me an example of what the log output you're seeing for this looks like? That exception isn't generated by Sente, but by Clojure's core.async. Depending on where+when it's actually occurring, it's possible that Sente (and so Timbre) is not actually doing the logging. That particular exception generally shouldn't happen under normal behaviour, and with correct buffering. There's some extra context (very old discussion) here. But we've got two potential issues on the table:
|
Here's an example of the exception
I was able to produce a similar exception locally with the I'm not too familiar with this code base but here are the main parts that I could find where sente is being used
|
I think I managed to get the logging working by creating a Thread/setDefaultUncaughtExceptionHandler (Thread/setDefaultUncaughtExceptionHandler I'm yet to confirm this in production because it has not happened there yet. I'm sure the issue of the exception being thrown is still there though, so if you have any clues what to look for as the source would be greatly appreciated! |
Hi,
I have an issue with the logging configuration. My project uses logback, which formats the logs to ecs format. However when sente throws and logs an exception, it does not go through logback. Instead I believe it's logged directly to stderr(?). I tried to use a custom timbre config and a custom appender that disables println appender and relogs the message with clojure.tools.logging. The config seems to work when I manually log things with timbre but does not apply to sente. Any ideas how to solve this issue?
The text was updated successfully, but these errors were encountered: