On 12/21/2013 11:20 AM, Sergey Vasilenko wrote: > Do you offer patch system python in solution #2? > In solution 2, as you can see from https://review.openstack.org/#/c/63094/11/openstack/common/log.py, we define class RFCSysLogHandler(logging.handlers.SysLogHandler) which overrides its base __init__ and format methods, by adding prefix to MSG part of the message (the prefix represents APP-NAME field according to RFC5424): msg = self.binary_name + ' ' + msg
Thus, w/o any Python system modifications, that change would backport 'ident' solution from Python 3.3 (http://hg.python.org/cpython/rev/6baa90fa2b6d), but for Oslo logging only. And I don't see any compatibility issues here. In solution 1, we use context adapter instead, to allow user extending log_format by %(binary_name)s as well. I'm not sure this method is good though, because there might be some issues with middlewares (e.g. this trace: http://paste.openstack.org/show/55519/), but probably it would be OK for IceHouse, gonna test it on DevStack as well. Stackers, please don't hesitate to discuss, which method we should use to ensure RFC5424 would be honored, at least (and at last) for syslog handler. -- Best regards, Bogdan Dobrelya, Researcher TechLead, Mirantis, Inc. +38 (066) 051 07 53 Skype bogdando_at_yahoo.com Irc #bogdando 38, Lenina ave. Kharkov, Ukraine www.mirantis.com www.mirantis.ru bdobre...@mirantis.com _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev