Gary McCormack
09/19/2023, 9:29 AMNok Lam Chan
09/19/2023, 9:48 AMGary McCormack
09/19/2023, 9:54 AMversion: 1
disable_existing_loggers: False
formatters:
simple:
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: simple
stream: <ext://sys.stdout>
info_file_handler:
class: logging.handlers.RotatingFileHandler
level: INFO
formatter: simple
filename: info.log
maxBytes: 10485760 # 10MB
backupCount: 20
encoding: utf8
delay: True
rich:
class: kedro.logging.RichHandler
rich_tracebacks: True
tracebacks_show_locals: True
loggers:
kedro:
level: INFO
my_pipeline:
level: INFO
package1:
level: INFO
package3:
level: INFO
package4:
level: INFO
root:
handlers: [rich, info_file_handler]
The goal is that all <http://logging.info|logging.info>()
statements in packages 1->4 are all printedNok Lam Chan
09/19/2023, 10:42 AMkedro
mean any logger with kedro
or kedro.xx.yy
will be configured accordinglyGary McCormack
09/19/2023, 10:49 AM[09/19/23 11:46:11] INFO Running node: node_function: node_function(None) -> [NODE.start_date,NODE.end_date] node.py:331
INFO Saving data to 'NODE.start_date' (MemoryDataset)... data_catalog.py:531
INFO Saving data to 'NODE.end_date' (MemoryDataset)... data_catalog.py:531
INFO Completed 1 out of 31 tasks sequential_runner.py:85
INFO Loading data from 'params:PARAMS.trader_initials' (MemoryDataset)...
But I would want verbose logging for what I see inside node_function
, if you get meNok Lam Chan
09/19/2023, 10:51 AMGary McCormack
09/19/2023, 10:54 AM<http://logger.info|logger.info>("I'm calculating this now"),logger.warning("High standard deviation found .."), etc etc
. I need these internal logging statements printed out in the stdout for the entire Kedro pipeline basicallyNok Lam Chan
09/19/2023, 10:54 AMlogger
?logger = logging.getLogger(___file___)
, the log should be printed.