CVtLogger Class Reference

class CVtLogger : public CActive

Debbuging support. To enable logging (either with RDebug or RFileLogger) follow steps below: 1. Create folder c: 2. Create file VTLOGCONF.txt 3. Open the file and define logging level by hexadecimal digit, see TLogLevel in class declaration below. Example: 2007 means that constructors (0x1), destructors (0x2 ) in media subsystem (0x4) are logged to file (0x2000), i.e. the values are bitwise or'ed. Log file name is "<thread name>.txt" where <thread name>=""> is name of the thread where logging takes places.

videoteleng
Since
2.6

Inherits from

Public Member Functions
~CVtLogger()
IMPORT_C TIntFlags()
IMPORT_C voidInitialize()
CVtLogger *NewL()
voidPrint(TDesC &)
IMPORT_C voidPrint(TInt, TPtrC)
IMPORT_C voidPrint(TInt, TPtrC, TInt)
IMPORT_C voidPrint(TInt, TPtrC, TInt, TInt)
IMPORT_C voidPrint(TInt, const TBool, TPtrC, TInt)
IMPORT_C voidUninitialize()
Private Member Functions
CVtLogger()
TBool CheckLevels(TInt)
voidConstructL()
voidDoCancel()
CVtLogger *Logger()
voidReadCongigFile()
voidRunL()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTLogLevel {
ELogConstruction = 0x00000001, ELogDestruction = 0x00000002, ELogMedia = 0x00000004, ELogSession = 0x00000008, ELogAudio = 0x00000010, ELogDetails = 0x00000020, ELogGeneric = 0x00000040, ELogReturn = 0x00000080, ELogLogEverything = 0x0000007F, ELogTime = 0x00001000, ELogToFile = 0x00002000, ELogApp1 = 0x00004000, ELogApp2 = 0x00008000, ELogApp3 = 0x00010000, ELogApp4 = 0x00020000, ECfgBBLoopbackEnabled = 0x00100000, ECfgPVLoopbackEnabled = 0x00200000, ECfgNoAudioSink = 0x00400000, ECfgNoAudioSource = 0x00800000, ECfgNoVideoSource = 0x01000000, ECfgNoVideoSink = 0x02000000
}
Private Member Enumerations
enumanonymous { ETempBufLength = 80 }
Inherited Enumerations
CActive:TPriority
Private Attributes
TInt iAccessCount
TBuf< ETempBufLength >iBuffer
TFileName iFileName
RFs iFs
TInt iLogLevel
TBuf< ETempBufLength >iTempBuf
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CVtLogger()

CVtLogger()[private]

C++ default constructor.

~CVtLogger()

~CVtLogger()[virtual]

Destructor.

Member Functions Documentation

CheckLevels(TInt)

TBool CheckLevels(TIntaLevels)const [private]

Returns if certain log levels are set.

Parameters

TInt aLevelsbitmap of TLogLevel values

ConstructL()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

DoCancel()

voidDoCancel()[private, virtual]

Cancels monitoring file change

Flags()

IMPORT_C TIntFlags()[static]

Returns flags in configuration file

Initialize()

IMPORT_C voidInitialize()[static]

Initializes logging. This must be called before any use of __VTPRINT macros.

Logger()

CVtLogger *Logger()[private, static]

Returns logger.

NewL()

CVtLogger *NewL()[static]

Two-phased constructor.

Print(TDesC &)

voidPrint(TDesC &aDes)[virtual]

Writes to log file or RDebug.

Parameters

TDesC & aDestext output

Print(TInt, TPtrC)

IMPORT_C voidPrint(TIntaLevel,
TPtrCaBuffer
)[static]

Writes buffer to log.

Parameters

TInt aLevelcombination of TLogLevel values
TPtrC aBufferbuffer to log

Print(TInt, TPtrC, TInt)

IMPORT_C voidPrint(TIntaLevel,
TPtrCaBuffer,
TIntaValue
)[static]

Writes buffer to log.

Parameters

TInt aLevelcombination of TLogLevel values
TPtrC aBufferbuffer to log
TInt aValuevalue appended to buffer

Print(TInt, TPtrC, TInt, TInt)

IMPORT_C voidPrint(TIntaLevel,
TPtrCaBuffer,
TIntaValue1,
TIntaValue2
)[static]

Writes buffer to log.

Parameters

TInt aLevelcombination of TLogLevel values
TPtrC aBufferbuffer to log
TInt aValue1first value appended to buffer
TInt aValue2second value appended to buffer

Print(TInt, const TBool, TPtrC, TInt)

IMPORT_C voidPrint(TIntaLevel,
const TBoolaEntry,
TPtrCaBuffer,
TIntaRetVal =  KVtDebugReturnValNotApplicable
)[static]
Writes buffer to log. This overloaded method is used for printing entry or exit from a function.
Since
Series60 2.8

Parameters

TInt aLevelcombination of TLogLevel values
const TBool aEntryif ETrue "<" is appended to end of string if EFalse ">" is appended to end of string
TPtrC aBufferbuffer to log
TInt aRetVal =  KVtDebugReturnValNotApplicable return value of the function. If this value is present (i.e. other than KVtDebugReturnValNotApplicable is passed) then aBuffer should include format tag 'd' where aRetValue should be placed.

ReadCongigFile()

voidReadCongigFile()[private]

Reads configuration file and starts monitoring changes on it.

RunL()

voidRunL()[private, virtual]

Handles file change notification

Uninitialize()

IMPORT_C voidUninitialize()[static]

Uninitializes logging. This must be called when client of logging service is deleted.

Member Enumerations Documentation

Enum anonymous

Enumerators

ETempBufLength = 80

Enum TLogLevel

Log level defining logging behavior.

Enumerators

ELogConstruction = 0x00000001
ELogDestruction = 0x00000002
ELogMedia = 0x00000004
ELogSession = 0x00000008
ELogAudio = 0x00000010
ELogDetails = 0x00000020
ELogGeneric = 0x00000040
ELogReturn = 0x00000080
ELogLogEverything = 0x0000007F
ELogTime = 0x00001000
ELogToFile = 0x00002000
ELogApp1 = 0x00004000
ELogApp2 = 0x00008000
ELogApp3 = 0x00010000
ELogApp4 = 0x00020000
ECfgBBLoopbackEnabled = 0x00100000

Loopback configuration (set only one of the following flags

ECfgPVLoopbackEnabled = 0x00200000
ECfgNoAudioSink = 0x00400000
ECfgNoAudioSource = 0x00800000
ECfgNoVideoSource = 0x01000000
ECfgNoVideoSink = 0x02000000

Member Data Documentation

TInt iAccessCount

TInt iAccessCount[private]

TBuf< ETempBufLength > iBuffer

TBuf< ETempBufLength >iBuffer[private]

TFileName iFileName

TFileName iFileName[private]

RFs iFs

RFs iFs[private]

TInt iLogLevel

TInt iLogLevel[private]

TBuf< ETempBufLength > iTempBuf

TBuf< ETempBufLength >iTempBuf[private]