Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Use logzero as root_logger. #144

@fx-kirin

Description

@fx-kirin
  • logzero version:1.5
  • Python version:3.6
  • Operating System:Linux

Description

As I wanted to use parent logger of each setup_logger instance, I tried to find the way to do it.

Buf default logzero setting is not what I intend to use for. The default is not inherited any instance of 'setup_logger'.

What I Did

import logzero
logzero.__name__ = ''
logzero.setup_logger()

When I executed the code above, I've used it as root_logger. And stopped using setup_logger. I used logger.get_logger('name') instead. Then, finally I got it work as I supposed to do.

Suggestion

I think it's not bad idea to describe how to use logzero as rootlogger in README or make a method to do this. I just would like to leave it in case someone else try to do the same thing.

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