Bryan Whiting
01/24/2023, 5:39 PMZanie
Zanie
Zanie
Bryan Whiting
01/24/2023, 9:58 PMBryan Whiting
01/24/2023, 9:59 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
Bryan 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
Zanie
Bryan Whiting
01/24/2023, 10:06 PMlog_prints=True
, so it’s just doing print_as_log()
Bryan Whiting
01/24/2023, 10:06 PMBryan Whiting
01/24/2023, 10:07 PMZanie
Zanie
<http://logger.info|logger.info>
in print_as_log
I think we need to set a stacklevel
Zanie
Zanie
Bryan Whiting
01/24/2023, 10:08 PMZanie
Zanie
The 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 PMBryan Whiting
01/24/2023, 10:11 PM<http://log.info|log.info>()
level rather than a global setting. is that true?Zanie
Zanie
Bryan Whiting
01/24/2023, 10:11 PMZanie
Zanie
Bryan 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
log_print
Bryan Whiting
01/24/2023, 10:26 PMZanie
Zanie
Bryan Whiting
01/24/2023, 10:26 PMprint_as_log()
Bryan Whiting
01/24/2023, 10:26 PMBryan Whiting
01/24/2023, 10:27 PMBryan Whiting
01/24/2023, 10:27 PMBryan Whiting
01/24/2023, 10:27 PMBryan Whiting
01/24/2023, 10:28 PM<http://logger.info|logger.info>()
this is WAI:Sidharth Ramalingam
02/18/2023, 4:43 AMSidharth Ramalingam
02/18/2023, 4:44 AMBryan Whiting
02/18/2023, 4:45 AMBryan Whiting
02/18/2023, 4:46 AMSidharth Ramalingam
02/18/2023, 4:46 AMSidharth Ramalingam
02/18/2023, 4:47 AMBryan Whiting
02/18/2023, 4:49 AMSidharth Ramalingam
02/18/2023, 4:50 AMSidharth Ramalingam
02/18/2023, 5:04 AMSidharth Ramalingam
02/18/2023, 5:04 AMSidharth Ramalingam
02/18/2023, 2:22 PMSidharth Ramalingam
02/18/2023, 2:22 PM