Re: CMPI debug messages

Thilo Boehm <[email protected]> Wed, 5 Dec 2012 15:24:53 +0100
Newsgroups gmane.network.open-pegasus.general
Message-ID <OF146FF17F.58F680F1-ONC1257ACB.0049B758-C1257ACB.004F2BC5@de.ibm.com>
Hello Vitezslav,

thank you for this very detailed  analyses.
And yes, you are right. 
Due to the logFileType of Logger::TRACE_LOG is used to avoid the loop of 
trace messages, 
the CMPI log messages are not written to the trace when the logLevel=TRACE

I opened a bugzilla for this at the head level:

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

Which OP version are you using ?

The planned schedule for OP you find here:

https://wiki.opengroup.org/pegasus-wiki/lib/exe/fetch.php?media=architectureteam:release_schedule_20120921.pdf

Mit Freundlichen Gruessen, best regards,
          Thilo Boehm

--------------------------------------------------------------------------
z/OS CIM Server Development
IBM Deutschland Research & Development GmbH, 
Boeblingen Germany
Schoenaicher Str.220 , D - 71032 Boeblingen
Tel.: +49 7031 16-4221
Fax.:+49 7031 16-3545
Internet: [email protected]

IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
 
--------------------------------------------------------------------------
If you're not paying for it, you're not the customer.
You're the product being sold.



From:   Vitezslav Crhonek <[email protected]>
To:     "[email protected]" <[email protected]>, 
Date:   05.12.2012 12:03
Subject:        CMPI debug messages



Hi,

We are experiencing problems with debug messages in CMPI providers
with CMPI_DEV_DEBUG. When cimserver is started with logLevel=TRACE,
traceLevel=5, enableHttpConnection=true traceFacility=File,
traceComponents=All, these messages didn't appear in the trace file.

Within Pegasus, mbEncLogMessage() (src/Pegasus/ProviderManager2/
/CMPI/CMPI_BrokerEnc.cpp) is used to match CMPI severity
codes to the Pegasus's Log levels.

Then Pegasus::Logger::put() is called, which calls
Pegasus::Logger::_putInternal(). The message is sent there
to the syslog then, it's not sent to the trace. This is intentionally
skipped with 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.

OK, it's intentional, but... In PEP 315 ([1]) I see:

"For this, the Logger::TRACE and Logger::TRACE_LOG level will be used
only internal for messages routed from the CIM server Tracer to the 
Logger."

So in my opinion there's a bug - CMPI_DEV_DEBUG message gets
logSeverity = Logger::TRACE; and logFileType = Logger::TRACE_LOG;
in mbEncLogMessage() - it's not something internal and it doesn't make
sense to have it in syslog and not in the trace file with other CMPI
messages. I believe this was overlooked when PEP 315 was implemented.

Best regards,
Vitezslav Crhonek

[1]
https://collaboration.opengroup.org/pegasus/pp/documents/16768/PEP_315_-Tracing_in_OpenPegasus.htm?gpid=228&type=doc&id=16768&fn=PEP_315_-Tracing_in_OpenPegasus.htm