Codemesh Runtime v3 C++ API Reference  3.9.205
xmog_tracer.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 
6 #ifndef xmog_tracer_inc
7 #define xmog_tracer_inc
8 
9 
10 #include "xmog.h"
11 
47 
54 {
55  TraceNothing = 0,
56  TraceJvm = 1,
57  TraceClr = 1,
58  TraceThread = 2,
59  TraceJni = 4,
60  TraceRemote = 8,
61  TraceCallbacks = 16,
62  TraceAll = 31,
63  TraceEverything = 31
64 };
65 
66 
73 {
74  TraceDisabled = 0,
75  TraceErrors = 1,
76  TraceError = 1,
77  TraceWarnings = 2,
78  TraceInfo = 3,
79  TraceFinest = 4,
80  TraceVerbose = 4,
81  TraceUnconditional = 5
82 };
83 
84 
94 typedef void (JNICALL *XMOG_TRACE)( FILE * fpTrace, int traceLevel, const char * format, va_list args );
95 
111 extern "C" XMOG_DECLSPEC void JNICALL traceOutputDebugString( FILE * fpTrace, int traceLevel, const char * format, va_list args );
112 
128 extern "C" XMOG_DECLSPEC void JNICALL traceEventLog( FILE * fpTrace, int traceLevel, const char * format, va_list args );
129 
130 
139 class XMOG_DECLSPEC xmog_tracer
140 {
141 public:
142 
151  static void JNICALL traceOutputDebugString( FILE * fpTrace, int traceLevel, const char * format, va_list args );
152 
161  static void JNICALL traceEventLog( FILE * fpTrace, int traceLevel, const char * format, va_list args );
162 
171  virtual void trace( int fac, xmog_trace_level level, const char * format, ... ) = 0;
172 
181  virtual void trace( xmog_trace_facility fac, xmog_trace_level level, const char * format, ... ) = 0;
182 };
183 
184 
186 {
187 public:
188 
189  xmog_inout_tracer( xmog_tracer * tracer, int fac, xmog_trace_level level, const char * name );
190 
192 
193 private:
194 
195  xmog_tracer * tracer_;
196 
197  int fac_;
198 
199  xmog_trace_level level_;
200 
201  const char * name_;
202 };
203 
204 #endif /* xmog_tracer_inc */
xmog_trace_level
xmog_trace_level
Tracing levels for the runtime.
Definition: xmog_tracer.h:72
xmog_trace_facility
xmog_trace_facility
Tracing facilities for the runtime.
Definition: xmog_tracer.h:53
traceEventLog
XMOG_DECLSPEC void JNICALL traceEventLog(FILE *fpTrace, int traceLevel, const char *format, va_list args)
A tracing entry point that can be specified by name.
xmog_tracer
An interface that provides a tracing facility for the runtime library.
Definition: xmog_tracer.h:139
xmog_inout_tracer
Definition: xmog_tracer.h:185
XMOG_TRACE
void(JNICALL * XMOG_TRACE)(FILE *fpTrace, int traceLevel, const char *format, va_list args)
A function type that can be used to trace to arbitrary file handles.
Definition: xmog_tracer.h:94
traceOutputDebugString
XMOG_DECLSPEC void JNICALL traceOutputDebugString(FILE *fpTrace, int traceLevel, const char *format, va_list args)
A tracing entry point that can be specified by name.

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.