Skip to content

Commit

Permalink
vdk-core: enable/disable structlog based on config (#3102)
Browse files Browse the repository at this point in the history
## Why?

vdk-structlog has a default config flag set to True when installed. It
relegates all logging configuration to the plugin and is checked in
core, i.e. if structlog is installed, vdk will use structlog. If it's
not installed, it will use the configuration available in core. The flag
is currently checked using an env variable, which makes it not work.

## What?

Check the flag using the config object

## How was this tested?

Manually

## What kind of change is this?

Bugfix

Signed-off-by: Dilyan Marinov <[email protected]>
Co-authored-by: Dilyan Marinov <[email protected]>
  • Loading branch information
2 people authored and yonitoo committed Feb 15, 2024
1 parent dd1a29e commit 91c2d2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def initialize_job(self, context: JobContext) -> None:
)
syslog_enabled = context.core_context.configuration.get_value(SYSLOG_ENABLED)
try: # If logging initialization fails we want to attempt sending telemetry before exiting VDK
if not os.environ.get("VDK_USE_STRUCTLOG"):
if not context.core_context.configuration.get_value("use_structlog"):
configure_loggers(
job_name,
attempt_id,
Expand Down

0 comments on commit 91c2d2d

Please sign in to comment.