Closed mski-iksm closed 3 years ago
When using gokart.build(), logging is disabled by HideLogger.
gokart.build()
HideLogger
import logging logger = logging.getLogger(__name__) class Example(gokart.TaskOnKart): def run(self): logger.debug("debug....") logger.warning("warning!!!!") logger.error("error") logger.critical("critical") self.dump("done") task = Example(rerun=True) output = gokart.build(task) >>> # no log
I thought it would be nice to have an optional feature that would allow to change the log level as in following example.
gokart.build(task, verbose=False, loglevel=logging.WARNING) >>> WARNING:__main__:warning!!!! >>> ERROR:__main__:error >>> CRITICAL:__main__:critical
@mski-iksm I think it's already implemented. Is this a different request? https://github.com/m3dev/gokart/pull/212
@vaaaaanquish This is just what I was looking for! Thank you!
When using
gokart.build()
, logging is disabled byHideLogger
.I thought it would be nice to have an optional feature that would allow to change the log level as in following example.