Skip to content

Configuring logging #461

Open
Open
@kbrah

Description

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?

(defn log-appender []
  {:enabled? true
   :fn (fn [{:keys [level ?err msg_]}]
         (log/log level ?err @msg_))})

  (timbre/with-merged-config {:appenders {:json-appender (log-appender)
                                          :println {:enabled? false}}}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions