Project

General

Profile

Actions

Support Request #11675

closed

Record log messages as Media Samples

Added by hidden almost 4 years ago. Updated over 3 years ago.

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.

Actions

Also available in: Atom PDF