Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: logwrap.h
Link against: logwrap.lib

Class CLogWrapper

CLogWrapper

Support

Supported from 6.0

Description

The log wrapper.

As some DFRDs do not use a Log Engine, the log wrapper provides a consistent interface to clients that need to work, without being changed, with multiple DFRDs.

The log wrapper is provided in its own DLL, the logwrap.dll.

If a Log Engine is not installed on a device, the log wrapper creates an instance of the CLogBase class, whose event handling requests complete with KErrNotSupported and whose functions return KErrNotSupported.

If a Log Engine is installed on a device, the log wrapper creates an instance of the CLogClient class, provided in a separate DLL, the logcli.dll . The CLogClient class derives from CLogBase and provides implementations for the event handling requests and functions.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CLogWrapperThe log wrapper

Defined in CLogWrapper:
ClientAvailable(), Log(), NewL(), ~CLogWrapper()

Inherited from CBase:
operator new()

See also:


Construction and destruction


NewL()

static CLogWrapper* NewL(RFs& aFs, TInt aPriority = CActive::EPriorityStandard);

Description

Creates a new instance of the log wrapper.

The function attempts to create an instance of the Log Engine class, CLogClient, from the client DLL, logcli.dll. If this is not possible, an instance of the Log Engine Base class, CLogBase, is created.

Provided that there is sufficient memory, the log wrapper is always created, whether or not the Log Engine exists.

Parameters

RFs& aFs

Handle to a file server session

TInt aPriority = CActive::EPriorityStandard

The priority of this active object. By default, this is the standard active object priority.

Return value

CLogWrapper*

Pointer to the new log wrapper object.

See also:


~CLogWrapper()

~CLogWrapper();

Description

Frees all resources owned by the log wrapper prior to its destruction. Specifically, it deletes the Log Engine (or the instance of the Log Engine base class, if the DFRD does not have a Log Engine installed).

[Top]


Logging


ClientAvailable()

TBool ClientAvailable() const;

Description

Determines whether the Log Engine is installed.

Return value

TBool

True if there is a Log Engine, False, otherwise.


Log()

CLogBase& Log();

Description

Gets a reference to the Log Engine object.

Return value

CLogBase&

If the Log Engine is installed, this is a reference to a CLogClient object. If there is no Log Engine, this is a reference to an instance of the Log Engine base class, CLogBase.

See also: