CDataLogger Class Reference

class CDataLogger : public CBase

Comments : Handles the transformation of input data into text suitable for output to a permanent store and the placing of that data in the store.

Inherits from

Constructor & Destructor Documentation

CDataLogger()

CDataLogger()[private]
Intended Usage : Constructor
Since
7.0

~CDataLogger()

~CDataLogger()
Intended Usage : Standardized virtual destruction method
Since
7.0

Member Functions Documentation

ConstructL(TLoggingInfo *)

voidConstructL(TLoggingInfo *aLogInfo)[private]
Intended Usage : Completes the safe construction of the CDataLogger object
leave
KErrNoMemory.
Since
7.0
Pre-condition
First phase of construction is complete
Post-condition
CDatalogger is fully constructed

Parameters

TLoggingInfo * aLogInfoThe logging configuration information

DumpMemoryBlock(const TUint8 *, TInt)

IMPORT_C voidDumpMemoryBlock(const TUint8 *aAddress,
TIntaLength
)

Intended Usage : Logs a block of memory to file in hexadecimal and ASCII format. For example:

	0000 : 40 fd 8f 01 38 fd 8f 01 21 5f 00 10 61 00 74 00 : @...8...!_..a.t.
	0010 : 61 55 ff 00 48 fd 8f 01 ac fd 8f 01 ac fd 8f 01 : aU..H...........
	0020 : 21 88 00 60 90 41 ff 00 01 00 00 00 24 1f 7b 00 : !..`.A......$.{.
	0030 : 61 00 74 00 72 00 65 00 34 fd 8f 01 23 00 f1 77 : a.t.r.e.4...#..w
	0040 : 23 00 00 00 38 00                               : #...8.          
Since
7.0
Pre-condition
None
Post-condition
The specified block of memory is output to file in hex and ASCII format

Parameters

const TUint8 * aAddressThe address of the start of the block to be logged
TInt aLengthThe number of bytes to be logged

Log(MLogOutput *, const TDesC16 &)

voidLog(MLogOutput *aLogOutput,
const TDesC16 &aMessage
)[private]
Intended Usage : Helper function which will log out a descriptor. The destination for logging depends whether an alternative logger was supplied by the user at construction. Descriptors to be logged are broken up into maximum lengths of 150 as this is more manageable and is the limit supported by RFileLogger. Wide descriptor version.
Since
7.0
Pre-condition
This CDataLogger is constructed
Post-condition
The message is logged to the destination

Parameters

MLogOutput * aLogOutputThe logging mechanism to use
const TDesC16 & aMessageThe descriptor to log

LogInformation(const TDesC16 &)

IMPORT_C voidLogInformation(const TDesC16 &aComment)
Intended Usage : Add the specified comment to the log file. Wide descriptor version Error Condition :
Since
7.0
Pre-condition
None
Post-condition
The specified text is added to the log file

Parameters

const TDesC16 & aCommentThe text to be logged

LogInformation(const TDesC8 &)

IMPORT_C voidLogInformation(const TDesC8 &aComment)
Intended Usage : Add the specified comment to the log file. Narrow descriptor version Error Condition :
Since
7.0
Pre-condition
None
Post-condition
The specified text is added to the log file

Parameters

const TDesC8 & aCommentThe text to be logged

LogInformationWithParameters(TRefByValue< const TDesC16 >, ...)

IMPORT_C voidLogInformationWithParameters(TRefByValue< const TDesC16 >aFormat,
...
)
Intended Usage : Add the specified comment to the log file. Wide descriptor version Error Condition :
Since
7.0
Pre-condition
None
Post-condition
The specified text is formatted and added to the log file

Parameters

TRefByValue< const TDesC16 > aFormatThe text to be formatted and logged
...

LogInformationWithParameters(TRefByValue< const TDesC8 >, ...)

IMPORT_C voidLogInformationWithParameters(TRefByValue< const TDesC8 >aFormat,
...
)
Intended Usage : Add the specified comment to the log file. Narrow descriptor version Error Condition :
Since
7.0
Pre-condition
None
Post-condition
The specified text is formatted and added to the log file

Parameters

TRefByValue< const TDesC8 > aFormatThe text to be formatted and logged
...

NewL(TLoggingInfo *)

CDataLogger *NewL(TLoggingInfo *aLogInfo)[static]
Intended Usage : Standardized safe construction which leaves nothing on the cleanup stack.
leave
KErrNoMemory.
Since
7.0
Pre-condition
None
Post-condition
Nothing is left on the CleanupStack

Parameters

TLoggingInfo * aLogInfoThe logging configuration information

NewLC(TLoggingInfo *)

CDataLogger *NewLC(TLoggingInfo *aLogInfo)[static]
Intended Usage : Standardized safe construction which leaves CDataLogger* on the cleanup stack.
leave
KErrNoMemory.
Since
7.0
Pre-condition
None
Post-condition
CDataLogger is on the CleanupStack

Parameters

TLoggingInfo * aLogInfoThe logging configuration information

ReportInformation(const TDesC &)

IMPORT_C voidReportInformation(const TDesC &aComment)
Intended Usage : Add the specified comment to the report file Error Condition :
Since
7.0
Pre-condition
None
Post-condition
The specified text is added to the report file

Parameters

const TDesC & aCommentThe text to be logged

ReportInformationWithParameters(TRefByValue< const TDesC >, ...)

IMPORT_C voidReportInformationWithParameters(TRefByValue< const TDesC >aFormat,
...
)
Intended Usage : Add the specified comment to the report file Error Condition :
Since
7.0
Pre-condition
None
Post-condition
The specified text is formatted and added to the log file

Parameters

TRefByValue< const TDesC > aFormatThe text to be formatted and logged
...

SetupLoggingL(TLoggingInfo *)

voidSetupLoggingL(TLoggingInfo *aLogInfo)[private]
Intended Usage : Error Condition :
Since
7.0
Pre-condition
Called from ConstructL()
Post-condition
Logging output objects are configured.

Parameters

TLoggingInfo * aLogInfoThe user supplied logging configuration information

SetupRDebugL(TBool)

voidSetupRDebugL(TBoolaRequest)[private]
Intended Usage : Error Condition :
Since
7.0
Pre-condition
Called only from ConstructL()
Post-condition
iDebug is set up for debug outputting or not.

Parameters

TBool aRequest

Member Data Documentation

TNullDebugPrint * iDebug

TNullDebugPrint *iDebug[private]

The class instance

CDefaultLogOutput * iDefaultLogOutput

CDefaultLogOutput *iDefaultLogOutput[private]

Pointer to a default log output if the user doesn't supply one

CDefaultLogOutput * iDefaultReportOutput

CDefaultLogOutput *iDefaultReportOutput[private]

Pointer to a default report output if the user doesn't supply one

HBufC * iFormatBuf

HBufC *iFormatBuf[private]

Provides the area for formatting log and report data

TLogFormat iLogFormat

TLogFormat iLogFormat[private]

The logging formats to be used if iLogStyle is HTML or custom.

MLogOutput * iLogOutput

MLogOutput *iLogOutput[private]

Provides the file logging facilities

TLoggingStyle iLogStyle

TLoggingStyle iLogStyle[private]

The logging style to be used (plain text, HTML or custom).

RFileLogger iReportFlogger

RFileLogger iReportFlogger[private]

Provides the file reporting facilities

MLogOutput * iReportOutput

MLogOutput *iReportOutput[private]

Provides the reporting facilities