- based on vish's log coulouring version for nova.
Change-Id: I9d4251b4292188c0174ebac1dcd98318df44c0e3
... | ... |
@@ -114,6 +114,13 @@ function configure_cinder() { |
114 | 114 |
iniset $CINDER_CONF DEFAULT rabbit_password $RABBIT_PASSWORD |
115 | 115 |
fi |
116 | 116 |
|
117 |
+ if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then |
|
118 |
+ # Add color to logging output |
|
119 |
+ iniset $CINDER_CONF DEFAULT logging_context_format_string "%(asctime)s %(color)s%(levelname)s %(name)s [[01;36m%(request_id)s [00;36m%(user_id)s %(project_id)s%(color)s] [01;35m%(instance)s%(color)s%(message)s[00m" |
|
120 |
+ iniset $CINDER_CONF DEFAULT logging_default_format_string "%(asctime)s %(color)s%(levelname)s %(name)s [[00;36m-%(color)s] [01;35m%(instance)s%(color)s%(message)s[00m" |
|
121 |
+ iniset $CINDER_CONF DEFAULT logging_debug_format_suffix "[00;33mfrom (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d[00m" |
|
122 |
+ iniset $CINDER_CONF DEFAULT logging_exception_prefix "%(color)s%(asctime)s TRACE %(name)s [01;35m%(instance)s[00m" |
|
123 |
+ fi |
|
117 | 124 |
} |
118 | 125 |
|
119 | 126 |
# init_cinder() - Initialize database and volume group |