Bryan Whiting
01/24/2023, 5:39 PMZanie
01/24/2023, 5:46 PMBryan Whiting
01/24/2023, 9:58 PMformatters:
simple:
format: "%(asctime)s.%(msecs)03d | %(message)s"
datefmt: "%H:%M:%S"
standard:
(): prefect.logging.formatters.PrefectFormatter
format: "%(asctime)s.%(msecs)03d | %(levelname)-7s | %(name)s | %(filename)s:%(lineno)s - %(funcName)20s() - %(message)s"
flow_run_fmt: "%(asctime)s.%(msecs)03d | %(levelname)-7s | Flow run %(flow_run_name)r | %(filename)s:%(lineno)s - %(funcName)20s() | %(message)s"
task_run_fmt: "%(asctime)s.%(msecs)03d | %(levelname)-7s | Task run %(task_run_name)r | %(filename)s:%(lineno)s - %(funcName)20s() | %(message)s"
datefmt: "%H:%M:%S"
Zanie
01/24/2023, 10:05 PMBryan Whiting
01/24/2023, 10:06 PM13:57:01.089 | INFO | Flow run 'imperial-hoatzin' | loggers.py:221 - print_as_log() | Available eval_metrics: ['mae', 'rmse'] (Note: xgboost uses the last to determine n_tree_limit)
Zanie
01/24/2023, 10:06 PMBryan Whiting
01/24/2023, 10:06 PMlog_prints=True
, so it’s just doing print_as_log()
Zanie
01/24/2023, 10:07 PM<http://logger.info|logger.info>
in print_as_log
I think we need to set a stacklevel
Bryan Whiting
01/24/2023, 10:08 PMZanie
01/24/2023, 10:08 PMThe third optional keyword argument is stacklevel, which defaults to. If greater than 1, the corresponding number of stack frames are skipped when computing the line number and function name set in the1
created for the logging event. This can be used in logging helpers so that the function name, filename and line number recorded are not the information for the helper function/method, but rather its caller.LogRecord
Bryan Whiting
01/24/2023, 10:09 PM<http://log.info|log.info>()
level rather than a global setting. is that true?Zanie
01/24/2023, 10:11 PMBryan Whiting
01/24/2023, 10:11 PMZanie
01/24/2023, 10:19 PMBryan Whiting
01/24/2023, 10:19 PMget_run_logger()
? lol. I only used print as a hack but now i’m realizing might just be better to use the base loggerZanie
01/24/2023, 10:26 PMlog_print
Bryan Whiting
01/24/2023, 10:26 PMZanie
01/24/2023, 10:26 PMBryan Whiting
01/24/2023, 10:26 PMprint_as_log()
<http://logger.info|logger.info>()
this is WAI:Sidharth Ramalingam
02/18/2023, 4:43 AMBryan Whiting
02/18/2023, 4:45 AMSidharth Ramalingam
02/18/2023, 4:46 AMBryan Whiting
02/18/2023, 4:49 AMSidharth Ramalingam
02/18/2023, 4:50 AM