Skip to content

Duplicated logsß #1

@buhtz

Description

@buhtz

Hi,

you pointed to that piece of code in an StackOverflow comment.

log = logging.getLogger(app_name)
stderr_handler = _stream_handler(logstream=sys.stderr, loglevel=logging.DEBUG, logname='stderr')
log.addHandler(stderr_handler)
stdout_handler = _stream_handler(
logstream=sys.stdout, loglevel=logging.INFO, logname='stdout', logfilters=[MaxLevelFilter(logging.INFO)]
)

I'm not sure if I get it right here. But doesn't this produce duplicated logs between stdout and stderr?
The stderr handle does log everything (all levels) to stderr not matter if the stdout handle does log something to stdout.

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