tracebacks are not logged to syslog

Bug #1514828 reported by Alicja Kwasniewska
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Invalid
High
Michał Jastrzębski
oslo.log
Fix Released
Low
Dmitry Mescheryakov

Bug Description

Even with use_syslog=true and syslog_level=debug tracebacks are not logged to syslog.
Messages on other levels are logged properly.

Tags: config log oslo
affects: pbr → oslo.log
Revision history for this message
Alicja Kwasniewska (alicja-kwasniewska) wrote :

Changing to invalid.
It seems that it that fault is on python-code side, as by default it does not pass any tracebacks to logging handler.

Changed in oslo.log:
status: New → Invalid
Revision history for this message
Michał Jastrzębski (inc007) wrote :

So this came out while trying to fix kolla rsyslog, but it doesn't seem to be kolla-specific.

logging.conf to reproduce:
http://paste.openstack.org/show/480563/

steps to reproduce:
run nova-conductor with this logging.conf and turn off rabbitmq.
If we change handler for root to stderr, we get nice full traceback.
With syslog handler we only get exception message, no traceback.

<dhellmann> inc0 : looking at the implementation, I can't tell if it should be including the full traceback or not. it calls getMessage() for the record, but I don't know if that includes the exception information or just the message

Changed in oslo.log:
status: Invalid → Confirmed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

oslo_log.handlers.OSSysLogHandler calls getMessage() on the record in its emit() method, but getMessage() doesn't include any exception information. We need to look at that ourselves, or just use self.format() to format the record and send that information to syslog.

Changed in oslo.log:
status: Confirmed → Triaged
importance: Undecided → Low
Changed in kolla:
assignee: nobody → Michał Jastrzębski (inc007)
importance: Undecided → Critical
status: New → Invalid
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.log (master)

Fix proposed to branch: master
Review: https://review.openstack.org/258442

Changed in oslo.log:
assignee: nobody → Dmitry Mescheryakov (dmitrymex)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.log (master)

Reviewed: https://review.openstack.org/258442
Committed: https://git.openstack.org/cgit/openstack/oslo.log/commit/?id=789a6625980f97a302d6320d864cebb35b405e1c
Submitter: Jenkins
Branch: master

commit 789a6625980f97a302d6320d864cebb35b405e1c
Author: Dmitry Mescheryakov <email address hidden>
Date: Wed Dec 16 14:40:21 2015 +0300

    Format record before passing it to syslog

    That solves two problems:
     * formatting specifed in options logging_context_format_string and
       logging_default_format_string is not applied to log entries
     * exception stack traces are not sent over syslog

    Change-Id: I1154c521014bedb4f88c094007fb612e71dace65
    Closes-Bug: #1526743
    Closes-Bug: #1514828

Changed in oslo.log:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/oslo.log 2.2.0

This issue was fixed in the openstack/oslo.log 2.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.