From 5cd44dbe6c0a641258f36d7959952bc971435b74 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 5 Apr 2017 07:23:37 -0400 Subject: [PATCH] add use_journal if we are enabling systemd This is going to be a new option in oslo.log, which we can start setting early to make it take effect. Change-Id: If0e5e4717a1810c759058f33608fbac7543f2d85 --- functions | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/functions b/functions index f6679fdebe..c99e435175 100644 --- a/functions +++ b/functions @@ -606,11 +606,13 @@ function setup_colorized_logging { function setup_systemd_logging { local conf_file=$1 local conf_section="DEFAULT" - local project_var="project_name" - local user_var="user_name" - iniset $conf_file $conf_section logging_context_format_string "%(levelname)s %(name)s [%(request_id)s %("$project_var")s %("$user_var")s] %(instance)s%(message)s" - iniset $conf_file $conf_section logging_default_format_string "%(levelname)s %(name)s [-] %(instance)s%(color)s%(message)s" - iniset $conf_file $conf_section logging_debug_format_suffix "from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d" + iniset $conf_file $conf_section use_journal "True" + iniset $conf_file $conf_section logging_context_format_string \ + "%(levelname)s %(name)s [%(request_id)s %(project_name)s %(user_name)s] %(instance)s%(message)s" + iniset $conf_file $conf_section logging_default_format_string \ + "%(levelname)s %(name)s [-] %(instance)s%(color)s%(message)s" + iniset $conf_file $conf_section logging_debug_format_suffix \ + "from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d" iniset $conf_file $conf_section logging_exception_prefix "ERROR %(name)s %(instance)s" }