Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turning off logging to stdout requires specific order #253

Open
itkovian opened this issue Dec 18, 2017 · 0 comments
Open

Turning off logging to stdout requires specific order #253

itkovian opened this issue Dec 18, 2017 · 0 comments

Comments

@itkovian
Copy link
Member

Statement order:

fancylogger.setroot()
fancylogger.logToDevLog(True)
fancylogger.logToScreen(enable=False)
fancylogger.setLogLevelInfo()

yields:

- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname submitfilter getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyLogger object at 0x172f390>, 'submitfilter', 'WARNING', 'NOTSET', 0, []]
- FANCYLOGGER_GETLOGGER_DEBUG     [<logging.RootLogger object at 0x115f390>, 'root', 'WARNING', 'WARNING', 0, []]
- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname submitfilter getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyLogger object at 0x172f390>, 'submitfilter', 'WARNING', 'NOTSET', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x172f410>, 'NOTSET')]]
- FANCYLOGGER_GETLOGGER_DEBUG     [<logging.RootLogger object at 0x115f390>, 'root', 'WARNING', 'WARNING', 0, []]
- FANCYLOGGER_LOGLEVEL_DEBUG SETROOT  30 WARNING
- FANCYLOGGER_LOGLEVEL_DEBUG SETROOT  [<vsc.utils.fancylogger.FancyRootLogger object at 0x165db10>, 'root', 'WARNING', 'WARNING', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x172f410>, 'NOTSET')]]
- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname  getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyRootLogger object at 0x165db10>, 'root', 'WARNING', 'WARNING', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x172f410>, 'NOTSET')]]
- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname  getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyRootLogger object at 0x165db10>, 'root', 'WARNING', 'WARNING', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x172f410>, 'NOTSET'), (<logging.handlers.SysLogHandler object at 0x165d410>, 'NOTSET')]]
- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname  getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyRootLogger object at 0x165db10>, 'root', 'WARNING', 'WARNING', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x172f410>, 'NOTSET'), (<logging.handlers.SysLogHandler object at 0x165d410>, 'NOTSET')]]
- FANCYLOGGER_LOGLEVEL_DEBUG 20 INFO
- FANCYLOGGER_LOGLEVEL_DEBUG [<vsc.utils.fancylogger.FancyRootLogger object at 0x165db10>, 'root', 'INFO', 'INFO', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x172f410>, 'NOTSET'), (<logging.handlers.SysLogHandler object at 0x165d410>, 'NOTSET')]]

Statement order

fancylogger.setroot()
fancylogger.logToScreen(enable=False)
fancylogger.logToDevLog(True)
fancylogger.setLogLevelInfo()

yields

- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname submitfilter getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyLogger object at 0x21a2390>, 'submitfilter', 'WARNING', 'NOTSET', 0, []]
- FANCYLOGGER_GETLOGGER_DEBUG     [<logging.RootLogger object at 0x1ba9390>, 'root', 'WARNING', 'WARNING', 0, []]
- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname submitfilter getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyLogger object at 0x21a2390>, 'submitfilter', 'WARNING', 'NOTSET', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x21a2410>, 'NOTSET')]]
- FANCYLOGGER_GETLOGGER_DEBUG     [<logging.RootLogger object at 0x1ba9390>, 'root', 'WARNING', 'WARNING', 0, []]
- FANCYLOGGER_LOGLEVEL_DEBUG SETROOT  30 WARNING
- FANCYLOGGER_LOGLEVEL_DEBUG SETROOT  [<vsc.utils.fancylogger.FancyRootLogger object at 0x20d6b10>, 'root', 'WARNING', 'WARNING', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x21a2410>, 'NOTSET')]]
- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname  getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyRootLogger object at 0x20d6b10>, 'root', 'WARNING', 'WARNING', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x21a2410>, 'NOTSET')]]
- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname  getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyRootLogger object at 0x20d6b10>, 'root', 'WARNING', 'WARNING', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x21a2410>, 'APOCALYPTIC')]]
- FANCYLOGGER_GETLOGGER_DEBUG name None fname False fullname  getRootLoggerName:  submitfilter
- parent_info verbose
- FANCYLOGGER_GETLOGGER_DEBUG [<vsc.utils.fancylogger.FancyRootLogger object at 0x20d6b10>, 'root', 'WARNING', 'WARNING', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x21a2410>, 'APOCALYPTIC'), (<logging.handlers.SysLogHandler object at 0x20d6410>, 'NOTSET')]]
- FANCYLOGGER_LOGLEVEL_DEBUG 20 INFO
- FANCYLOGGER_LOGLEVEL_DEBUG [<vsc.utils.fancylogger.FancyRootLogger object at 0x20d6b10>, 'root', 'INFO', 'INFO', 0, [(<vsc.utils.fancylogger.FancyStreamHandler object at 0x21a2410>, 'APOCALYPTIC'), (<logging.handlers.SysLogHandler object at 0x20d6410>, 'NOTSET')]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant