Skip to content

Instantly share code, notes, and snippets.

@yuuichi-fujioka
Last active July 25, 2016 02:10
Show Gist options
  • Save yuuichi-fujioka/1872768e6259cedca04efb34b0908b85 to your computer and use it in GitHub Desktop.
Save yuuichi-fujioka/1872768e6259cedca04efb34b0908b85 to your computer and use it in GitHub Desktop.
openstack logging configuration file
# horizon
LOGGING = {
...
'formatters': {
...
'file': {
'format': '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s %(message)s'
},
},
'handlers': {
...
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': '/opt/stack/logs/horizon/horizon.log',
'formatter': 'file',
},
},
'loggers': {
'foo': {
'handlers': [..., 'file'],
}
}
}
[DEFAULT]
logging_exception_prefix = %(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s
logging_debug_format_suffix = from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d
logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s %(instance)s%(message)s
logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(project_id)s %(user_id)s] %(instance)s%(message)s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment