moved the logger creation to the utils package to make them available to all packages without recreating or passing them

This commit is contained in:
pb
2025-04-15 12:00:43 +02:00
parent 31580f1905
commit 6f7acee2df
2 changed files with 5 additions and 2 deletions

View File

@@ -36,7 +36,10 @@ func GetLogger() zerolog.Logger {
func GetWFLogger(workflowName string) zerolog.Logger {
onceWF.Do(func(){
wf_logger = logger.With().Str("argo_name", workflowName).Str("workflow_id", conf.GetConfig().WorkflowID).Str("workflow_execution_id", conf.GetConfig().ExecutionID).Logger()
wf_logger = logger.With().
Str("argo_name", workflowName).
Str("workflow_id", conf.GetConfig().
WorkflowID).Str("workflow_execution_id", conf.GetConfig().ExecutionID).Logger()
})
return wf_logger
}