Skip to content

Different log levels for different groups of loggers #215

Open
@JetForMe

Description

@JetForMe

One of the powerful features of Java's log4j is that different logging levels can be set for large swaths of the code. This is accomplished with a couple of things:

  • Generally, each class has its own logger, named after the fully-qualified class name (Java has a hierarchical naming convention of pacakges and classes in them, e.g. myapp.app.model.entities.Employee
  • Log level can be specified at any level, e.g. myapp.app.model should log at TRACE, everything else at ERROR.
  • If a logger doesn't have a specific log level set, it uses its parent's level

These levels can be set at run time, making it easy to turn up or down the logging on parts of the code you need to focus on, without obscuring the output with too many messages from uninteresting code.

I don't see a way for swift-log to do that.

Metadata

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