-
Notifications
You must be signed in to change notification settings - Fork 59
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
vdk-structlog: incorporate vdk-core built-in logging plugin into vdk-structlog #2939
vdk-structlog: incorporate vdk-core built-in logging plugin into vdk-structlog #2939
Conversation
Signed-off-by: Yoan Salambashev <[email protected]>
Signed-off-by: Yoan Salambashev <[email protected]>
projects/vdk-core/src/vdk/internal/builtin_plugins/config/log_config.py
Outdated
Show resolved
Hide resolved
@hookimpl | ||
def vdk_initialize(self, context: CoreContext): | ||
# Use this plugin for logging config and warn the user about the vdk-core logging deprecation | ||
os.environ["VDK_USE_STRUCTLOG"] = "1" | ||
configure_initial_logging() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please post log outputs of jobs using all formats, e.g. one for json, one fore console, one for ltsv?
I have a hunch that this might mess up parts of the initial log. But I also see we still eject the formatter later on, so not sure. It would be nice to see the full output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 1 for JSON and 1 for console to the PR description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you show the whole output in something like pastebin? My concern is that it won't be formatted as JSON top to bottom, or it will have metadata that we didn't want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it is: https://pastebin.com/8NnfF0En
projects/vdk-core/src/vdk/internal/builtin_plugins/config/log_config.py
Outdated
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/config/log_config.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Yoan Salambashev <[email protected]>
Signed-off-by: Yoan Salambashev <[email protected]>
Signed-off-by: Yoan Salambashev <[email protected]>
Signed-off-by: Yoan Salambashev <[email protected]>
Signed-off-by: Yoan Salambashev <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have further discussion around this. I really messed up the task definition. 😕
…lugin is used (#2944) What: This is part of #2813 which is addressed by #2939. Add logging plugin warning and check if the vdk-structlog plugin is used by checking the dedicated env var VDK_USE_STRUCTLOG. Why: To notify the user about the logging configuration changes and to guide them to use vdk-structlog instead. Signed-off-by: Yoan Salambashev <[email protected]>
Issue was resolved here. #2985 |
What:
Incorporate vdk-core built-in logging plugin into vdk-structlog by moving the logging configuration and relevant tests.
Introduced the vdk-core changes (warning and keeping the vdk-core functionality behind a flag which is activated upon the vdk-structlog installation) as part of the PR #2944.
Why: To avoid reconfiguring the logging config, thus losing information, by vdk-structlog but instead just configure it once.
Testing Done: Existing tests pass and the introduced tests from vdk-core logging are passing.
Logging format screenshots:
Signed-off-by: Yoan Salambashev [email protected]