Skip to content

FileLogger add level argument to match SimpleLogger #82

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
)

Activity

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

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