Skip to content

Provide a way to set the default logger via configuration or jvm args #34

@gavares

Description

@gavares

The default logger defaults to NullLogger right now. We have backend code that uses slf4j and need a simple way to configure the SLF4JLoggerFactory backend when running in the JVM. This isn't as simple as putting a configuration point in a single place where our application starts. There are numerous other scenarios where we may not go through that entry point but still need our backend code to use the SLF4JLoggerFactory (unit tests, integ tests, console, dev main vs prod main, etc.)

We'd like to configure the slogging backend in a manner similar to what is done to configure Akka to use the slf4j logging backend which is to put an entry in our application.conf like:

slogging.backend = "slogging.SLF4JLoggerFactory"

Unfortunately that would mean that your slogging core would have to take a dependency on TypesafeConfig which probably isn't doable.

An alternative is to allow jvm args: -Dslogging.backend=slogging.SLF4JLoggerFactory

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