BLPAPI C++  3.24.10
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);
131 int blpapi_Logging_configureLogging(int level,
132  const char *fileName,
133  int rolloverFileCount,
134  int rolloverFileLimit);
147 #ifdef __cplusplus
148 }
149 
157 namespace BloombergLP {
158 namespace blpapi {
159 
167 struct Logging {
168 
169  struct Severity {
171  enum Type {
172 
180  };
181  };
182 
183  // CLASS METHODS
184  static void logTestMessage(Severity::Type severity);
189 };
190 
194 // ============================================================================
195 // INLINE FUNCTION DEFINITIONS
196 // ============================================================================
197 
198 // --------------
199 // struct Logging
200 // --------------
201 
202 // CLASS METHODS
204 {
206  (static_cast<blpapi_Logging_Severity_t>(severity));
207 }
208 
209 } // close namespace blpapi
210 } // close namespace BloombergLP
211 
212 #endif
213 
214 #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:171
Common definitions used by the library.
Represents a date and/or time.
int blpapi_Logging_configureLogging(int level, const char *fileName, int rolloverFileCount, int rolloverFileLimit)
Definition: blpapi_types.h:121
Definition: blpapi_abstractsession.h:187
Definition: blpapi_types.h:117
ERROR.
Definition: blpapi_logging.h:175
#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:169
TRACE.
Definition: blpapi_logging.h:179
DEBUG.
Definition: blpapi_logging.h:178
static void logTestMessage(Severity::Type severity)
Definition: blpapi_logging.h:203
Definition: blpapi_types.h:122
unsigned long long blpapi_UInt64_t
Definition: blpapi_types.h:70
WARN.
Definition: blpapi_logging.h:176
Definition: blpapi_datetime.h:102
Definition: blpapi_types.h:123
INFO.
Definition: blpapi_logging.h:177
#define BLPAPI_EXPORT
Definition: blpapi_defs.h:171
Provide functions for dispatchtbl.
OFF.
Definition: blpapi_logging.h:173
Definition: blpapi_logging.h:167
Definition: blpapi_types.h:119
FATAL.
Definition: blpapi_logging.h:174