C++ Based OPC UA Client/Server/PubSub SDK
1.7.6.537
|
A class used for trace outputs (error, information,...). More...
#include <uatrace.h>
Inherited by LibT, SrvT, SrvT, SrvT, SrvT, SrvT, and SrvT.
Public Types | |
enum | TraceLevel { NoTrace = 0, Errors, Warning, Info, InterfaceCall, CtorDtor, ProgramFlow, Data } |
Definition of the TraceLevel Enumeration. More... | |
Public Member Functions | |
UaTrace () | |
construction | |
virtual | ~UaTrace () |
destruction | |
Static Public Member Functions | |
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 void | setPreFileTrace (bool isActive, TraceLevel traceLevel) |
Provides a string buffer trace before a trace file is created. More... | |
static long | setProductVersion (const UaString &appVersion) |
Get the trace level. More... | |
static TraceLevel | getTraceLevel () |
Get the trace level. More... | |
static UaString | getTraceFilePath () |
Get the path of the trace file. 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 This hook is set by the SDK and intended for internal use only. 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 | flushTrace () |
Write any data from the file buffer to the physical file. More... | |
static void | closeTrace () |
Close trace file. More... | |
static bool | isInitialized () |
Returns the information if the trace is already initialized. | |
static bool | isPreFileTraceActive () |
Get PreFileTrace active state. More... | |
static std::list< UaString > | getPreFileTraces () |
Returns the list of pre file trace outputs. | |
static void | clearPreFileTraces () |
Clear the list of pre file trace outputs. | |
static void | setMaxPreFileTraceEntries (unsigned int nMaxPreFileTraceEntries) |
Returns the list of pre file trace outputs. More... | |
Static Protected Member Functions | |
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,...).
|
static |
Change the trace settings.
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. |
|
static |
Close trace file.
|
static |
Write any data from the file buffer to the physical file.
|
static |
Get the path of the trace file.
|
static |
Get the trace level.
Initialize the trace.
traceFile | the file where the trace will be printed in. |
appName | the application name. |
|
static |
Initialize the trace.
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. |
|
static |
Get PreFileTrace active state.
|
static |
Set a trace hook for all error, warning and info trace messages This hook is set by the SDK and intended for internal use only.
If you want to implement your own trace just use setTraceHook(UaTraceHook* pTraceHook).
pErrorTraceHook | Interface pointer for the trace hook. |
|
static |
Set time output for trace to local time.
isLocal | true if local false if not. |
|
static |
Returns the list of pre file trace outputs.
nMaxPreFileTraceEntries | the new setting for . |
|
static |
Provides a string buffer trace before a trace file is created.
This can be used to activate a trace before the configuration with the file settings is loaded.
isActive | The active setting for the pre file trace. |
traceLevel | The actual trace level to use for the pre file trace. |
|
static |
Set time output for trace to print also the date.
printDateInTrace | true if print date in trace false if not. |
|
static |
Get the trace level.
|
static |
Set a trace hook for all trace messages passing the configured trace level.
pTraceHook | Interface pointer for the trace hook. |
|
static |
Ctor and Dtor trace output.
fmt | the message to be printed out |
|
static |
Data trace output.
fmt | the message to be printed out |
|
static |
Error trace output.
fmt | the message to be printed out |
|
static |
External interface call trace output.
fmt | the message to be printed out |
|
static |
Info trace output.
fmt | the message to be printed out |
|
static |
Program flow trace output.
fmt | the message to be printed out |
|
staticprotected |
File trace output preparation.
traceLevel | the actual trace level. |
fmt | the message to be printed out |
arg_ptr | a pointer to the arguments. |
|
staticprotected |
File trace output.
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. |
|
static |
Warning trace output.
fmt | the message to be printed out |