Marc Gris
08/21/2023, 7:09 AMmarrrcin
08/21/2023, 7:30 AMMarc Gris
08/21/2023, 8:50 AMdatajoely
08/21/2023, 8:52 AMafter_pipeline_run
hook, you have access to the session_id
Marc Gris
08/21/2023, 3:01 PMsession_id
is a datetime like str
, correct ?
If so… What am I supposed to do with it to access to the run’s log ?
Thx in advance for you time, advice and patience 🙏🏼 🙂datajoely
08/21/2023, 3:02 PMMarc Gris
08/21/2023, 5:00 PMdatajoely
08/21/2023, 5:02 PMMarc Gris
08/22/2023, 8:20 AMdatajoely
11/03/2023, 9:11 AMJuan Luis
11/03/2023, 9:19 AMdatajoely
11/03/2023, 9:24 AMOmegaConf
resolvers available in logging.yml
? Could you do something like
info_file_handler:
class: logging.handlers.RotatingFileHandler
level: INFO
formatter: simple
filename: info_${oc.env:KEDRO_SESSION_ID}.log
Juan Luis
11/03/2023, 9:26 AM$KEDRO_SESSION_ID
wouldn't normally be set, or am I missing something?datajoely
11/03/2023, 9:32 AMbefore_pipeline_run
hookJuan Luis
11/03/2023, 9:33 AM${kedro:session_id}
resolver that got it from the session?datajoely
11/03/2023, 9:33 AMMarc Gris
11/03/2023, 9:37 AMJuan Luis
11/03/2023, 9:49 AMsettings.py
, it's unclear to me how to fetch the global Kedro session or context 🤔datajoely
11/03/2023, 10:04 AMNok Lam Chan
11/03/2023, 10:14 AMlogging
should support this and you just need to defined the filepath to save in data
instead of the root directory.datajoely
11/03/2023, 10:17 AMNok Lam Chan
11/03/2023, 10:28 AMsession_id
? Otherwise there are easy way to rotate the files (pretty sure it was asked a few months ago). Using OmegaConfigLoader
may not be ideal because it is decoupled from config loader in 0.19, it will be just a simple yaml.load
Ivan Danov
11/03/2023, 10:42 AMMarc Gris
11/03/2023, 4:15 PMdatajoely
11/03/2023, 4:16 PMJuan Luis
11/03/2023, 9:16 PMkedro run > log_$(date).txt
Ivan Danov
11/06/2023, 9:53 AMRotatingFileHandler
, which will always create a new file. The path and the name of that file can be configured through logging.yaml
. Making that file have the same name as the session id is not that easy indeed, but doable with a few hacks. I think the work on this will make it much easier once it's done: https://github.com/kedro-org/kedro/issues/1731