Ulogger::MOutputPlugin Class Reference

#include <uloggeroutputplugin.h>

Link against: uloggerpluginframework.lib

class Ulogger::MOutputPlugin

Abstract class for ULogger output plug-ins.

Public Attributes
const CPlugin::TPluginInterfaceiInterfaceId
Public Member Functions
virtual ~MOutputPlugin()
pure virtual voidCloseOutputPlugin()
pure virtual TInt ConfigureOutputPlugin(const RPointerArray< TPluginConfiguration > &)
pure virtual TInt Write(const TDesC8 &)

Detailed Description

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.

Member Attribute Documentation

iInterfaceId

const CPlugin::TPluginInterfaceiInterfaceId[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).

Constructor & Destructor Documentation

~MOutputPlugin ( )

~MOutputPlugin()[inline, virtual]

Virtual destructor.

Member Function Documentation

CloseOutputPlugin ( )

voidCloseOutputPlugin()[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.

ConfigureOutputPlugin ( const RPointerArray< TPluginConfiguration > & )

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.

ParameterDescription
aConfigsactual configurations valid for this instance

Returns: KErrNone, if successful; otherwise one of the other system wide error codes.

Write ( const TDesC8 & )

TInt Write(const TDesC8 &aData)[pure virtual]

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.

ParameterDescription
aDatathe Trace data to output, in BTrace format

Returns: KErrNone, if successful; otherwise one of the other system wide error codes.