#include <uloggeroutputplugin.h>
class Ulogger::MOutputPlugin |
Abstract class for ULogger output plug-ins.
Public Attributes | |
---|---|
const CPlugin::TPluginInterface | iInterfaceId |
Public Member Functions | |
---|---|
virtual | ~MOutputPlugin() |
pure virtual void | CloseOutputPlugin() |
pure virtual TInt | ConfigureOutputPlugin(const RPointerArray< TPluginConfiguration > &) |
pure virtual TInt | Write(const TDesC8 &) |
A ULogger output plug-in is responsible for writing Trace log data to some output medium. Examples for output media are files, serial ports or TCP sockets. Whenever ULogger needs to output Trace log data, it passes this to the currently selected output plug-in, which then handles the actual writing to an output medium.
All output plug-ins must derive from this class in order to be compatible with ULogger. They must also derive from ULogger::CPlugin (whose header is already included by this header, for convenience) in order to be compatible with the ECom framework, which ULogger uses to load its output plug-ins.
const CPlugin::TPluginInterface | iInterfaceId | [static] |
Output plug-in interface id. This is for ULogger to distinguish between the different types of plug-ins (e.g. Output vs Input plug-ins).
void | CloseOutputPlugin | ( | ) | [pure virtual] |
Called by ULogger to indicate that the output plug-in must flush all buffers and release any locked resources. Any resources may be locked only after any other method is called.
TInt | ConfigureOutputPlugin | ( | const RPointerArray< TPluginConfiguration > & | aConfigs | ) | [pure virtual] |
Called by ULogger as first method after construction or after changes in config file. This allows the output plug-in to initialize itself with its private settings.
Parameter | Description |
---|---|
aConfigs | actual configurations valid for this instance |
Returns: KErrNone, if successful; otherwise one of the other system wide error codes.
Writes the given data to the output media that is represented by the plug-in implementation. This method is called by ULogger whenever Trace log data becomes available. How much data is passed to this function depends on how ULogger is configured; the length of the given descriptor indicates the size of the data packet. The intervals at which this method is called depends on the amount of Trace data that is logged from code in the currently running processes.
Parameter | Description |
---|---|
aData | the Trace data to output, in BTrace format |
Returns: KErrNone, if successful; otherwise one of the other system wide error codes.