UaTrace Class Reference
[UA Base Library Classes]

#include <uatrace.h>

Inherited by LibT.

Collaboration diagram for UaTrace:

List of all members.


Public Types

enum  TraceLevel {
  NoTrace = 0, Errors, Warning, Info,
  InterfaceCall, CtorDtor, ProgramFlow, Data
}
 Definition of the TraceLevel Enumeration. More...

Public Member Functions

 UaTrace ()
virtual ~UaTrace ()

Static Public Member Functions

static long initTrace (TraceLevel traceLevel, unsigned int maxTraceEntries, unsigned int NumBackupFiles, const UaString &traceFile, const UaString &appName)
static long changeTrace (TraceLevel traceLevel, unsigned int maxTraceEntries, unsigned int NumBackupFiles, const UaString &traceFile)
static long initErrorTrace (const UaString &traceFile, const UaString &appName)
static TraceLevel getTraceLevel ()
static void setLocalTimeOutput (bool isLocal)
static void setPrintDateInTrace (bool printDateInTrace)
static void tError (const char *fmt,...)
static void tWarning (const char *fmt,...)
static void tInfo (const char *fmt,...)
static void tIfCall (const char *fmt,...)
static void tCtor (const char *fmt,...)
static void tInOut (const char *fmt,...)
static void tData (const char *fmt,...)
static void closeTrace ()

Static Protected Member Functions

static void trace (TraceLevel traceLevel, const char *fmt, va_list arg_ptr)

Detailed Description

A class used for trace outputs (error, information,...).

Member Enumeration Documentation

Definition of the TraceLevel Enumeration.

Enumerator:
NoTrace  Trace_Level: No Trace
Errors  Trace_Level: Errors
Warning  Trace_Level: Warning
Info  Trace_Level: Info
InterfaceCall  Trace_Level: Interface Call
CtorDtor  Trace_Level: Ctor - Dtor
ProgramFlow  Trace_Level: Program Flow
Data  Trace_Level: Data


Constructor & Destructor Documentation

UaTrace::UaTrace (  ) 

construction

UaTrace::~UaTrace (  )  [virtual]

destruction


Member Function Documentation

long UaTrace::initTrace ( TraceLevel  traceLevel,
unsigned int  maxTraceEntries,
unsigned int  NumBackupFiles,
const UaString traceFile,
const UaString appName 
) [static]

Initialize the trace.

Parameters:
traceLevel the actual trace level.
maxTraceEntries the maximum of trace entries.
NumBackupFiles the number of all backup files.
traceFile the file where the trace will be printed out.
appName the application name.
Returns:
the initialized trace.

long UaTrace::changeTrace ( TraceLevel  traceLevel,
unsigned int  maxTraceEntries,
unsigned int  NumBackupFiles,
const UaString traceFile 
) [static]

Change the trace settings.

Parameters:
traceLevel the actual trace level.
maxTraceEntries the maximum number of trace entries.
NumBackupFiles the number of all backup files.
traceFile the file where the trace will be printed in.
Returns:
the trace settings.

long UaTrace::initErrorTrace ( const UaString traceFile,
const UaString appName 
) [static]

Initialize the trace.

Parameters:
traceFile the file where the trace will be printed in.
appName the application name.
Returns:
the initialized error trace.

UaTrace::TraceLevel UaTrace::getTraceLevel (  )  [static]

Get the trace level.

Returns:
the trace level.

void UaTrace::setLocalTimeOutput ( bool  isLocal  )  [static]

Set time output for trace to local time.

Parameters:
isLocal true if local false if not.

void UaTrace::setPrintDateInTrace ( bool  printDateInTrace  )  [static]

Set time output for trace to print also the date.

Parameters:
printDateInTrace true if print date in trace false if not.

void UaTrace::tError ( const char *  fmt,
  ... 
) [static]

Error trace output.

Parameters:
fmt the message to be printed out

void UaTrace::tWarning ( const char *  fmt,
  ... 
) [static]

Warning trace output.

Parameters:
fmt the message to be printed out

void UaTrace::tInfo ( const char *  fmt,
  ... 
) [static]

Info trace output.

Parameters:
fmt the message to be printed out

void UaTrace::tIfCall ( const char *  fmt,
  ... 
) [static]

External interface call trace output.

Parameters:
fmt the message to be printed out

void UaTrace::tCtor ( const char *  fmt,
  ... 
) [static]

Ctor and Dtor trace output.

Parameters:
fmt the message to be printed out

void UaTrace::tInOut ( const char *  fmt,
  ... 
) [static]

Program flow trace output.

Parameters:
fmt the message to be printed out

void UaTrace::tData ( const char *  fmt,
  ... 
) [static]

Data trace output.

Parameters:
fmt the message to be printed out

void UaTrace::closeTrace (  )  [static]

Close trace file.

void UaTrace::trace ( TraceLevel  traceLevel,
const char *  fmt,
va_list  arg_ptr 
) [static, protected]

File trace output.

Parameters:
traceLevel the actual trace level.
fmt the message to be printed out
arg_ptr a ponter to the arguments.


The documentation for this class was generated from the following files:
  • src/uabase/uabasecpp/uatrace.h
  • src/uabase/uabasecpp/uatrace.cpp