Skip to content

Commit

Permalink
Merge pull request #455 from jettero/console-log-opt
Browse files Browse the repository at this point in the history
I sometimes desire to change the console log format.
  • Loading branch information
basepi authored Sep 17, 2018
2 parents f12cbb1 + 685e8d1 commit 84c8f64
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hubblestack/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,15 @@ def load_config():
])
__opts__['disable_modules'] = disable_modules

# Console logging is probably the same, but can be different
console_logging_opts = {
'log_level': __opts__.get('console_log_level', __opts__['log_level']),
'log_format': __opts__.get('console_log_format'),
'date_format': __opts__.get('console_log_date_format'),
}

# Setup logging
salt.log.setup.setup_console_logger(__opts__['log_level'])
salt.log.setup.setup_console_logger(**console_logging_opts)
salt.log.setup.setup_logfile_logger(__opts__['log_file'],
__opts__['log_level'],
max_bytes=__opts__.get('logfile_maxbytes', 100000000),
Expand Down

0 comments on commit 84c8f64

Please sign in to comment.