Skip to content

How to set format on backends? #55

@zhaoyi0113

Description

@zhaoyi0113

I am not sure whether this is an issue or a question.

Below is my configuration which works fine:

config :logger, backends: [{LoggerFileBackend, :error_log}]

Now I want to add a format for the log and I am not sure how to do that. I tried a few configuration but none of them work as below. How can I configure the format?

config :logger, backends: [{LoggerFileBackend, :error_log, format: "\n$date $time $metadata $levelpad$message\n"}]

config :logger, backends: [{LoggerFileBackend, :error_log}],
   format: "\n$date $time $metadata $levelpad$message\n"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions