prjemian / stdlogpj

python logging done my way
0 stars 0 forks source link

separate the handlers #10

Open prjemian opened 4 years ago

prjemian commented 4 years ago

motivated by this discussion: https://github.com/bluesky/ophyd/pull/785#discussion_r378328049

prjemian commented 4 years ago

Like to reach a goal using a standard preamble:

import logging
logger = logging.getLogger(__name__)

logger.addHandler(stdlogpj.consoleReportHandler())
logger.addHandler(stdlogpj.fileReportHandler())