Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ To ensure usage of secure packages, it is up to the user to similarly relock the
## Features

* #402: Created nox session `vulnerabilities:resolved` to report resolved GitHub security issues
* #733: Adjusted structlog and log level for workflow generation

## Refactoring

Expand Down
14 changes: 3 additions & 11 deletions exasol/toolbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import structlog
from structlog.dev import ConsoleRenderer
from structlog.processors import (
CallsiteParameter,
CallsiteParameterAdder,
TimeStamper,
add_log_level,
format_exc_info,
Expand All @@ -18,16 +16,10 @@
processors=[
# 1. Enrich the data first
add_log_level,
TimeStamper(fmt="iso"),
CallsiteParameterAdder(
{
CallsiteParameter.MODULE,
CallsiteParameter.FUNC_NAME,
}
),
TimeStamper(fmt="%Y-%m-%d %H:%M:%S"),
# 2. Handle exceptions
format_exc_info,
# 3. Rendering option
ConsoleRenderer(),
# 3. Render
ConsoleRenderer(pad_level=False),
],
)
7 changes: 6 additions & 1 deletion exasol/toolbox/util/workflows/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import structlog

logger = structlog.get_logger(__name__).bind(subsystem="workflows")
from exasol.toolbox import log_level

logger = structlog.get_logger(__name__)

if log_level == "DEBUG":
logger = logger.bind(subsystem="workflows")
2 changes: 1 addition & 1 deletion exasol/toolbox/util/workflows/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def load_from_template(
patch_yaml: WorkflowCommentedMap | None = None,
):
with bound_contextvars(template_file_name=file_path.name):
logger.info("Load workflow template: %s", file_path.name)
logger.debug("Load workflow template: %s", file_path.name)

if not file_path.exists():
raise FileNotFoundError(file_path)
Expand Down