Skip to content

FileLogger add level argument to match SimpleLogger #82

@sjdaines

Description

@sjdaines

With Logging.SimpleLogger you can do

SimpleLogger(logstream, Logging.Info)

It would be convenient if LoggingExtras.FileLogger allowed level to be set in the same way so it works as a drop-in replacement, ie

FileLogger(logstream, Logging.Info)
FileLogger("my_logfile.txt", Logging.Info)

edit: perhaps this is just a documentation request, the equivalent is (?):

LoggingExtras.MinLevelLogger(
    LoggingExtras.FileLogger(logstream, always_flush=true),
    Logging.Info
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions