00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00047 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_TRACE
00048 #define PANTHEIOS_INCL_PANTHEIOS_H_TRACE
00049
00050
00051
00052
00053
00054 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00055 # define PANTHEIOS_VER_PANTHEIOS_H_TRACE_MAJOR 1
00056 # define PANTHEIOS_VER_PANTHEIOS_H_TRACE_MINOR 3
00057 # define PANTHEIOS_VER_PANTHEIOS_H_TRACE_REVISION 1
00058 # define PANTHEIOS_VER_PANTHEIOS_H_TRACE_EDIT 16
00059 #endif
00060
00061
00062
00063
00064
00065 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
00066 # include <pantheios/pantheios.h>
00067 #endif
00068 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_FILELINE
00069 # include <pantheios/fileline.h>
00070 #endif
00071
00072 #ifdef PANTHEIOS_USE_WIDE_STRINGS
00073 # error The Pantheios Tracing API is currently only supported in multibyte builds
00074 #endif
00075
00076 #include <stlsoft/stlsoft.h>
00077
00078
00079
00080
00081
00118 #if defined(STLSOFT_CF_SUPPORTS_VARIADIC_MACROS) && \
00119 !defined(PANTHEIOS_NO_USE_VARIADIC_MACROS)
00120 # define PANTHEIOS_USES_VARIADIC_MACROS
00121 #endif
00122
00123
00124
00144
00145 # if !defined(PANTHEIOS_TRACE_PREFIX)
00146 # define PANTHEIOS_TRACE_PREFIX PANTHEIOS_FILELINE
00147 # ifdef __cplusplus
00148 # define PANTHEIOS_TRACE_LOG_PREFIX ::pantheios::pan_slice_t(PANTHEIOS_FILELINE, STLSOFT_NUM_ELEMENTS(PANTHEIOS_FILELINE) - 1)
00149 # else
00150 # define PANTHEIOS_TRACE_LOG_PREFIX PANTHEIOS_FILELINE
00151 # endif
00152 # else
00153 # define PANTHEIOS_TRACE_LOG_PREFIX PANTHEIOS_TRACE_PREFIX
00154 # endif
00155
00156
00157
00158 #if defined(PANTHEIOS_USES_VARIADIC_MACROS) || \
00159 defined(PANTHEIOS_DOCUMENTATION_SKIP_SECTION)
00160
00172 # if !defined(PANTHEIOS_NO_NAMESPACE) || \
00173 defined(PANTHEIOS_DOCUMENTATION_SKIP_SECTION)
00174 # define PANTHEIOS_TRACE_PRINTF(sev, fmt, ...) ::pantheios::pantheios_logprintf((sev), "%s" fmt, stlsoft_static_cast(PANTHEIOS_NS_QUAL(pan_char_t) const*, PANTHEIOS_TRACE_PREFIX), __VA_ARGS__)
00175 # else
00176 # define PANTHEIOS_TRACE_PRINTF(sev, fmt, ...) pantheios_logprintf((sev), "%s" fmt, stlsoft_static_cast(PANTHEIOS_NS_QUAL(pan_char_t) const*, PANTHEIOS_TRACE_PREFIX), __VA_ARGS__)
00177 # endif
00178
00179 # if !defined(PANTHEIOS_NO_NAMESPACE) || \
00180 defined(PANTHEIOS_DOCUMENTATION_SKIP_SECTION)
00181
00256 # define PANTHEIOS_TRACE(sev, ...) ::pantheios::log((sev), PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00257 # if !defined(PANTHEIOS_NO_STOCK_LEVELS)
00258 # define PANTHEIOS_TRACE_EMERGENCY(...) ::pantheios::log(PANTHEIOS_SEV_EMERGENCY, PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00259 # define PANTHEIOS_TRACE_ALERT(...) ::pantheios::log(PANTHEIOS_SEV_ALERT, PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00260 # define PANTHEIOS_TRACE_CRITICAL(...) ::pantheios::log(PANTHEIOS_SEV_CRITICAL, PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00261 # define PANTHEIOS_TRACE_ERROR(...) ::pantheios::log(PANTHEIOS_SEV_ERROR, PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00262 # define PANTHEIOS_TRACE_WARNING(...) ::pantheios::log(PANTHEIOS_SEV_WARNING, PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00263 # define PANTHEIOS_TRACE_NOTICE(...) ::pantheios::log(PANTHEIOS_SEV_NOTICE, PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00264 # define PANTHEIOS_TRACE_INFORMATIONAL(...) ::pantheios::log(PANTHEIOS_SEV_INFORMATIONAL, PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00265 # define PANTHEIOS_TRACE_DEBUG(...) ::pantheios::log(PANTHEIOS_SEV_DEBUG, PANTHEIOS_TRACE_LOG_PREFIX, __VA_ARGS__)
00266 # endif
00267 # endif
00268
00269 #endif
00270
00271
00272
00273
00274
00275 #ifdef STLSOFT_PPF_pragma_once_SUPPORT
00276 # pragma once
00277 #endif
00278
00279
00280
00281 #endif
00282
00283