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 #1

Updated by hidden almost 4 years ago

  • Status changed from New to In Progress
  • Topic set to ADTF::Logging
Actions #2

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.

Actions #3

Updated by hidden almost 4 years ago

Thanks. Can be closed.

Actions #4

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 #5

Updated by hidden over 3 years ago

  • Status changed from To Be Closed to Closed
Actions

Also available in: Atom PDF