Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stdout and local time for logging #32

Merged
merged 1 commit into from
May 30, 2024

Conversation

RichieB2B
Copy link
Contributor

Structlog defaults to writing logs to stdout and writing timestamps in local time. IMHO initialise_logging() should not change these defaults.

It is very confusing when apps like orchestrator switch logging formats midway during initialisation.

import structlog
from nwastdlib.logging import initialise_logging

logger = structlog.get_logger(__name__)
logger.info("Goes to stdout with timestamp in local time")
initialise_logging()
logger.info("Goes to stderr with timestamp in UTC")

@pboers1988 pboers1988 merged commit 4b32826 into workfloworchestrator:master May 30, 2024
@pboers1988
Copy link
Member

Ill create a new release next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants