Skip to content

[pull] master from bugy:master #11

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

Merged
merged 2 commits into from
Apr 23, 2025
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
5 changes: 5 additions & 0 deletions src/execution/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ def start_logging(self, execution_id,
script_config,
parameter_value_wrappers,
start_time_millis=None):

if script_config.logging_config:
if not script_config.logging_config.enabled:
LOGGER.info(f'Logging is disabled for script {script_config.name}, skipping log creation')
return

script_name = str(script_config.name)

Expand Down
4 changes: 3 additions & 1 deletion src/model/server_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ def get_ssl_cert_path(self):


class LoggingConfig:
def __init__(self, filename_pattern=None, date_format=None) -> None:
def __init__(self, filename_pattern=None, date_format=None, enabled=True) -> None:
self.filename_pattern = filename_pattern
self.date_format = date_format
self.enabled = enabled

@classmethod
def from_json(cls, json_config):
Expand All @@ -72,6 +73,7 @@ def from_json(cls, json_config):
json_logging_config = json_config
config.filename_pattern = json_logging_config.get('execution_file')
config.date_format = json_logging_config.get('execution_date_format')
config.enabled = model_helper.read_bool_from_config('enabled', json_logging_config, default=True)

return config

Expand Down