viesti / timbre-json-appender

JSON appender for Timbre
MIT License
44 stars 11 forks source link

Error when namespace is filtered #16

Closed Limess closed 3 years ago

Limess commented 3 years ago

I haven't dug into this much, but when I'm setting the log namespace to not include the namespace which is logging, I'm getting a Jackson exception:

i.e. when min-level is set to [["other.*"]] and I call (timbre/info "message") from say, signal.test I get:

Exception: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]
 at com.fasterxml.jackson.databind.exc.MismatchedInputException.from (MismatchedInputException.java:59)
    com.fasterxml.jackson.databind.ObjectMapper._initForReading (ObjectMapper.java:4686)
    com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose (ObjectMapper.java:4584)
    com.fasterxml.jackson.databind.ObjectMapper.readValue (ObjectMapper.java:3546)
    com.fasterxml.jackson.databind.ObjectMapper.readValue (ObjectMapper.java:3514)
    jsonista.core$eval7884$fn__7885.invoke (core.clj:188)
    jsonista.core$eval7849$fn__7850$G__7840__7857.invoke (core.clj:166)
    jsonista.core$read_value.invokeStatic (core.clj:232)
    jsonista.core$read_value.invoke (core.clj:222)
Limess commented 3 years ago

This was entirely human error and I didn't read my namespaces - this was in my test code for a wrapping library 🤦🏻