Not easy to be positive without more information about your code base, but
the only times I had symptoms that resemble what you describe, the problem
was that the JVM died before printing. That is, you have multiple threads,
and printing is asynchronous at many levels (even the terminal itself
buffers stuff). If the app dies in that condition it's actually fairly
common that messages aren't visible, even though the statement and
sometimes a few next ones have indeed run. Nothing to do with Timbre as far
as I can tell.

Maybe try to give your app a bit more wall-clock time between the error and
killing the process? (Note: I don't think you can do that by sleeping in
the shutdownhook as the JVM will not necessarily wait on that one.)

On Monday, 9 October 2017, Shantanu Kumar <kumar.shant...@gmail.com> wrote:

>
>
> On Monday, 9 October 2017 12:34:41 UTC+5:30, lawrence...@gmail.com
> <javascript:_e(%7B%7D,'cvml','lawrence...@gmail.com');> wrote:
>>
>> Shantanu Kumar, thanks for that, I might try it. I assume you've never
>> had the problem I'm talking about, of messages on background threads that
>> disappear?
>>
>
> Logback (the SLF4j impl we use) is capable of logging from multiple
> threads. I always set the default uncaught handler to log any exception
> arising from background threads:
> https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#
> setDefaultUncaughtExceptionHandler(java.lang.Thread.
> UncaughtExceptionHandler)
>
> Stuart Sierra also wrote about how to do this: https://stuartsierra.
> com/2015/05/27/clojure-uncaught-exceptions
>
> If you do this step correctly, you might be able to notice the
> background-thread exceptions even with a plain `println` call.
>
>
> Shantanu
>
>
>>
>>
>> On Monday, October 9, 2017 at 2:56:24 AM UTC-4, Shantanu Kumar wrote:
>>>
>>>
>>>>
>>>> I'm curious what others do for logging?
>>>>
>>>
>>> At Concur we using Cambium https://github.com/kumarshantanu/cambium
>>> that's being moved (WIP) here: https://github.com/cambium-clojure
>>>
>>> Cambium wraps SLF4j and gives a Clojure API (which extends
>>> tools.logging) to use it's MDC feature.
>>>
>>>
>>> Shantanu
>>>
>>>> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','clojure@googlegroups.com');>
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');>.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to