BLPAPI C++  3.23.2
blpapi_logging.h
Go to the documentation of this file.
1 /* Copyright 2012. Bloomberg Finance L.P.
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a copy
4  * of this software and associated documentation files (the "Software"), to
5  * deal in the Software without restriction, including without limitation the
6  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7  * sell copies of the Software, and to permit persons to whom the Software is
8  * furnished to do so, subject to the following conditions: The above
9  * copyright notice and this permission notice shall be included in all copies
10  * or substantial portions of the Software.
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18  * IN THE SOFTWARE.
19  */
20 
28 #ifndef INCLUDED_BLPAPI_LOGGING
29 #define INCLUDED_BLPAPI_LOGGING
30 
84 #ifndef INCLUDED_BLPAPI_CALL
85 #include <blpapi_call.h>
86 #endif
87 
88 #ifndef INCLUDED_BLPAPI_DATETIME
89 #include <blpapi_datetime.h>
90 #endif
91 
92 #ifndef INCLUDED_BLPAPI_DEFS
93 #include <blpapi_defs.h>
94 #endif
95 
96 #ifdef __cplusplus
97 extern "C" {
98 #endif
99 
100 typedef void (*blpapi_Logging_Func_t)(blpapi_UInt64_t threadId,
101  int severity,
102  blpapi_Datetime_t timestamp,
103  const char *category,
104  const char *message);
118  blpapi_Logging_Severity_t thresholdSeverity);
137 #ifdef __cplusplus
138 }
139 
147 namespace BloombergLP {
148 namespace blpapi {
149 
157 struct Logging {
158 
159  struct Severity {
161  enum Type {
162 
170  };
171  };
172 
173  // CLASS METHODS
174  static void logTestMessage(Severity::Type severity);
179 };
180 
184 // ============================================================================
185 // INLINE FUNCTION DEFINITIONS
186 // ============================================================================
187 
188 // --------------
189 // struct Logging
190 // --------------
191 
192 // CLASS METHODS
194 {
196  (static_cast<blpapi_Logging_Severity_t>(severity));
197 }
198 
199 } // close namespace blpapi
200 } // close namespace BloombergLP
201 
202 #endif
203 
204 #endif
void(* blpapi_Logging_Func_t)(blpapi_UInt64_t threadId, int severity, blpapi_Datetime_t timestamp, const char *category, const char *message)
Definition: blpapi_logging.h:100
Definition: blpapi_types.h:120
blpapi_Logging_Severity_t
Definition: blpapi_types.h:116
Type
Enumeration used to specify different logging severity levels.
Definition: blpapi_logging.h:161
Common definitions used by the library.
Represents a date and/or time.
Definition: blpapi_types.h:121
Definition: blpapi_abstractsession.h:220
Definition: blpapi_types.h:117
ERROR.
Definition: blpapi_logging.h:165
#define BLPAPI_CALL(FUNCNAME)
Definition: blpapi_call.h:353
void blpapi_Logging_logTestMessage(blpapi_Logging_Severity_t severity)
int blpapi_Logging_registerCallback(blpapi_Logging_Func_t callback, blpapi_Logging_Severity_t thresholdSeverity)
Definition: blpapi_types.h:118
Definition: blpapi_logging.h:159
TRACE.
Definition: blpapi_logging.h:169
DEBUG.
Definition: blpapi_logging.h:168
static void logTestMessage(Severity::Type severity)
Definition: blpapi_logging.h:193
Definition: blpapi_types.h:122
unsigned long long blpapi_UInt64_t
Definition: blpapi_types.h:70
WARN.
Definition: blpapi_logging.h:166
Definition: blpapi_datetime.h:102
Definition: blpapi_types.h:123
INFO.
Definition: blpapi_logging.h:167
#define BLPAPI_EXPORT
Definition: blpapi_defs.h:171
Provide functions for dispatchtbl.
OFF.
Definition: blpapi_logging.h:163
Definition: blpapi_logging.h:157
Definition: blpapi_types.h:119
FATAL.
Definition: blpapi_logging.h:164