[cfg] Use stderr for logging by default
It is quite important for json-like output of results in CLI. Change-Id: I0e2afdc165a7f65763597cb354d9c2acdcebdc07
This commit is contained in:
parent
2102b6eeea
commit
aab953d055
@ -61,7 +61,7 @@
|
||||
|
||||
# Log output to standard error. This option is ignored if
|
||||
# log_config_append is set. (boolean value)
|
||||
#use_stderr = false
|
||||
#use_stderr = true
|
||||
|
||||
# Format string to use for log messages with context. (string value)
|
||||
#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s
|
||||
|
@ -1206,6 +1206,7 @@ class API(object):
|
||||
project="rally",
|
||||
version=rally_version.version_string(),
|
||||
default_config_files=config_files)
|
||||
CONF.set_default("use_stderr", True)
|
||||
|
||||
logging.setup("rally")
|
||||
if not CONF.get("log_config_append"):
|
||||
|
@ -33,6 +33,13 @@ def list_opts():
|
||||
return merged_opts.items()
|
||||
|
||||
|
||||
def update_opt_defaults():
|
||||
logging.oslogging.cfg.set_defaults(
|
||||
logging.oslogging._options.generic_log_opts,
|
||||
use_stderr=True
|
||||
)
|
||||
|
||||
|
||||
_registered = False
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user