Actions
Support Request #11675
closedRecord log messages as Media Samples
Status:
Closed
Priority:
Normal
Customer:
VW
Department:
CARMEQ
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Affected Products:
Platform:
Ubuntu 18.04 64bit
Topic:
ADTF::Logging
FAQ Links:
Description
Supportanfrage
We would like to record all log messages (LOG_INFO, LOG_ERROR, ...) into a dat-file. In ADTF2.14!
Is this possible? Can we write our own "logging-sinks" to transform messages into mediasamples?
Lösung
yes it is possible, you have to implement an IConsoleListener and register at IConsoleDevice, like this:
cObjectPtr<IConsoleDevice> pConsoleDevice;
if (IS_OK(_runtime->GetObject(OID_CONSOLE_DEVICE, IID_CONSOLE_DEVICE, (tVoid**)&pConsoleDevice)))
{
pConsoleDevice->CON_RegisterListener(this);
}
Then you can access the Log Messages and create Media Samples.
Updated by hidden almost 4 years ago
- Status changed from New to In Progress
- Topic set to ADTF::Logging
Updated by hidden almost 4 years ago
- Status changed from In Progress to Customer Feedback Required
Hi Marc,
yes it is possible, you have to implement an IConsoleListener and register at IConsoleDevice, like this:
cObjectPtr<IConsoleDevice> pConsoleDevice;
if (IS_OK(_runtime->GetObject(OID_CONSOLE_DEVICE, IID_CONSOLE_DEVICE, (tVoid**)&pConsoleDevice)))
{
pConsoleDevice->CON_RegisterListener(this);
}
Then you can access the Log Messages and create Media Samples.
Updated by hidden almost 4 years ago
- Project changed from 20 to Public Support
- Subject changed from ADTF2: Log-Messages to Dat-File to Record log messages as Media Samples
- Description updated (diff)
- Status changed from Customer Feedback Required to To Be Closed
- Private changed from Yes to No
- Resolution set to Solved Issue
Actions