orchestrator-core icon indicating copy to clipboard operation
orchestrator-core copied to clipboard

[Feature]: more control over logging

Open RichieB2B opened this issue 1 year ago • 2 comments

Contact Details

richard.vandenberg (at) NCSC-NL

What should we build?

When the connection to the database fails, Orchestrator logs the connection string including password to stderr. We have no control over this because of this line:

https://github.com/workfloworchestrator/orchestrator-core/blob/4a3e438bfed77e6db8b2e06f3d7a9ae8e4b3ada6/orchestrator/app.py#L262

We would like to be able to set pretty_exceptions_show_locals=False and other Typer() options.

Additionally this line sets up structlog in a very static way, causing all sorts of problems. See https://github.com/workfloworchestrator/nwa-stdlib/pull/32 It would be great to be able to set our own handlers and formatting.

https://github.com/workfloworchestrator/orchestrator-core/blob/4a3e438bfed77e6db8b2e06f3d7a9ae8e4b3ada6/orchestrator/app.py#L117

Relevant pseudo code

No response

RichieB2B avatar May 30 '24 17:05 RichieB2B

It would be very handy if we could pass some extra info to OrchestratorCore that allows one to configure/use the additional loggers config dict.

Then we can use it like it was supposed: implementation of initialise_logging()

acidjunk avatar May 30 '24 17:05 acidjunk

Hi Guys, thanks for the issue. Logging is something that could definitely receive some TLC, perhaps you would be willing to make a PR?

pboers1988 avatar May 30 '24 19:05 pboers1988

@RichieB2B Did https://github.com/workfloworchestrator/nwa-stdlib/pull/32 solves your issue? If not, please reopen this issue.

hanstrompert avatar Mar 03 '25 10:03 hanstrompert