A class used for trace outputs (error, information,...).
More...
#include <uatrace.h>
Inherited by LibT, and SrvT.
|
static long | initTrace (TraceLevel traceLevel, unsigned int maxTraceEntries, unsigned int NumBackupFiles, const UaString &traceFile, const UaString &appName) |
| Initialize the trace. More...
|
|
static long | changeTrace (TraceLevel traceLevel, unsigned int maxTraceEntries, unsigned int NumBackupFiles, const UaString &traceFile) |
| Change the trace settings. More...
|
|
static long | initErrorTrace (const UaString &traceFile, const UaString &appName) |
| Initialize the trace. More...
|
|
static long | setProductVersion (const UaString &appVersion) |
| Get the trace level. More...
|
|
static TraceLevel | getTraceLevel () |
| Get the trace level. More...
|
|
static void | setLocalTimeOutput (bool isLocal) |
| Set time output for trace to local time. More...
|
|
static void | setPrintDateInTrace (bool printDateInTrace) |
| Set time output for trace to print also the date. More...
|
|
static void | setTraceHook (UaTraceHook *pTraceHook) |
| Set a trace hook for all trace messages passing the configured trace level. More...
|
|
static void | setErrorTraceHook (UaTraceHook *pErrorTraceHook) |
| Set a trace hook for all error, warning and info trace messages. More...
|
|
static void | tError (const char *fmt,...) |
| Error trace output. More...
|
|
static void | tWarning (const char *fmt,...) |
| Warning trace output. More...
|
|
static void | tInfo (const char *fmt,...) |
| Info trace output. More...
|
|
static void | tIfCall (const char *fmt,...) |
| External interface call trace output. More...
|
|
static void | tCtor (const char *fmt,...) |
| Ctor and Dtor trace output. More...
|
|
static void | tInOut (const char *fmt,...) |
| Program flow trace output. More...
|
|
static void | tData (const char *fmt,...) |
| Data trace output. More...
|
|
static void | closeTrace () |
| Close trace file. More...
|
|
static bool | isInitialized () |
| Returns the information if the trace is already initialized.
|
|
|
static void | trace (TraceLevel traceLevel, const char *fmt, va_list arg_ptr) |
| File trace output preparation. More...
|
|
static void | traceOutput (TraceLevel traceLevel, const char *sContent, int nModule=0, bool bFromUaStack=false) |
| File trace output. More...
|
|
A class used for trace outputs (error, information,...).
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
|
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.
void UaTrace::closeTrace |
( |
| ) |
|
|
static |
Get the trace level.
- Returns
- the trace level.
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.
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.
void UaTrace::setErrorTraceHook |
( |
UaTraceHook * |
pErrorTraceHook | ) |
|
|
static |
Set a trace hook for all error, warning and info trace messages.
- Parameters
-
pErrorTraceHook | Interface pointer for the trace hook. |
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. |
long UaTrace::setProductVersion |
( |
const UaString & |
productVersion | ) |
|
|
static |
Get the trace level.
- Returns
- the trace level.
Set a trace hook for all trace messages passing the configured trace level.
- Parameters
-
pTraceHook | Interface pointer for the trace hook. |
void UaTrace::tCtor |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Ctor and Dtor 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::tError |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Error 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::tInfo |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Info 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::trace |
( |
TraceLevel |
traceLevel, |
|
|
const char * |
fmt, |
|
|
va_list |
arg_ptr |
|
) |
| |
|
staticprotected |
File trace output preparation.
- Parameters
-
traceLevel | the actual trace level. |
fmt | the message to be printed out |
arg_ptr | a pointer to the arguments. |
void UaTrace::traceOutput |
( |
TraceLevel |
traceLevel, |
|
|
const char * |
sContent, |
|
|
int |
nModule = 0 , |
|
|
bool |
bFromUaStack = false |
|
) |
| |
|
staticprotected |
File trace output.
- Parameters
-
traceLevel | the actual trace level. |
sContent | the message to be printed out |
nModule | the module printing the message. |
bFromUaStack | a flag indicating if the message is from the stack. |
void UaTrace::tWarning |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Warning trace output.
- Parameters
-
fmt | the message to be printed out |
The documentation for this class was generated from the following files:
- D:/work/uasdkcpp/src/uabase/uabasecpp/uatrace.h
- D:/work/uasdkcpp/src/uabase/uabasecpp/uatrace.cpp