Skip to content

Instantly share code, notes, and snippets.

@achied
Created September 19, 2012 14:08
Show Gist options
  • Select an option

  • Save achied/3749880 to your computer and use it in GitHub Desktop.

Select an option

Save achied/3749880 to your computer and use it in GitHub Desktop.
Openstack logging config for syslog compliant
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -821,8 +821,6 @@ class SysLogHandler(logging.Handler):
# Message is a string. Convert to bytes as required by RFC 5424
if type(msg) is unicode:
msg = msg.encode('utf-8')
- if codecs:
- msg = codecs.BOM_UTF8 + msg
msg = prio + msg
try:
if self.unixsocket:
--logging_context_format_string=%(name)s: %(message)s [%(request_id)s %(user_id)s %(project_id)s]
--logging_default_format_string=%(name)s[%(process)d]: %(message)s
--logging_debug_format_suffix= from %(funcName)s %(pathname)s:%(lineno)d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment