From a04f72fc4a1e569806e97a7161c6c36a259dd8cf Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Mon, 5 Nov 2018 14:27:16 -0800 Subject: [PATCH] Cleaned up devstack logging Switch to systemd logging to take advantage of some of the newer logging features. Story: 2004272 Task: 27820 Change-Id: I475bf26e24b3a725f68c7da355807374bf1e189b (cherry picked from commit daa7d0495119f02abfe53142ca237a4084db5297) --- devstack/lib/magnum | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/devstack/lib/magnum b/devstack/lib/magnum index 69f0d3181c..f9d812391b 100644 --- a/devstack/lib/magnum +++ b/devstack/lib/magnum @@ -176,16 +176,13 @@ function create_magnum_conf { iniset $MAGNUM_CONF oslo_concurrency lock_path "$MAGNUM_STATE_PATH" fi - if [ "$SYSLOG" != "False" ]; then - iniset $MAGNUM_CONF DEFAULT use_syslog "True" + if [ "$USE_SYSTEMD" != "False" ]; then + setup_systemd_logging $MAGNUM_CONF fi # Format logging - if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then + if [ "$LOG_COLOR" == "True" ] && [ "$USE_SYSTEMD" == "False" ]; then setup_colorized_logging $MAGNUM_CONF DEFAULT - else - # Show user_name and project_name instead of user_id and project_id - iniset $MAGNUM_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s] %(instance)s%(message)s" fi # Register SSL certificates if provided