Bug 883395 - pegasus does not save CMPI debug logs
Summary: pegasus does not save CMPI debug logs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: tog-pegasus
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-04 13:43 UTC by Jan Safranek
Modified: 2013-01-12 01:20 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-01-12 01:20:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Experimental patch (830 bytes, patch)
2012-12-04 13:43 UTC, Jan Safranek
no flags Details | Diff

Description Jan Safranek 2012-12-04 13:43:50 UTC
Created attachment 657524 [details]
Experimental patch

When calling CMPIBroker->logMessage() with CMPI_DEV_DEBUG severity, the message is not saved in Pegasus trace file. All other log levels are saved there.

Pegasus is started in this way:

cimserver logLevel=TRACE traceLevel=5 enableHttpConnection=true traceFacility=File traceComponents=All


CMPI logs are saved using mbEncLogMessage(), which correctly translates the log level and calls Pegasus::Logger::put(), which calls Pegasus::Logger::_putInternal().

Now it starts to be interesting, Logger::_putInternal() sends the message to syslog and then intentionally skips sending the message to trace file with following comment:
    // PEP 315
    // The trace can be routed into the log. The logged trace messages are
    // logged with logFileType of Logger::TRACE_LOG.
    // To avoid a cirular writing of these messages, log messages with
    // logFileType of Logger::TRACE_LOG are never send to the trace.

Thus, the message never gets to trace log.

Attached patch adds a workaround, I am not sure if it's the best way to fix this bug.


Version-Release number of selected component (if applicable):
tog-pegasus-2.12.0-2.fc18.test.x86_64

Comment 2 Vitezslav Crhonek 2012-12-05 13:38:29 UTC
There's opened upstream bug to track this:

http://bugzilla.openpegasus.org/show_bug.cgi?id=9484

Comment 3 Fedora Update System 2012-12-06 09:17:54 UTC
tog-pegasus-2.12.0-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/tog-pegasus-2.12.0-3.fc18

Comment 4 Fedora Update System 2012-12-06 20:15:19 UTC
Package tog-pegasus-2.12.0-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing tog-pegasus-2.12.0-3.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19862/tog-pegasus-2.12.0-3.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-01-12 01:20:31 UTC
tog-pegasus-2.12.0-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.