BLPAPI C++ 3.25.8
Loading...
Searching...
No Matches
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
97extern "C" {
98#endif
99
100typedef 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);
132 const char *fileName,
133 int rolloverFileCount,
134 int rolloverFileLimit);
147#ifdef __cplusplus
148}
149
157namespace BloombergLP {
158namespace blpapi {
159
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
Provide functions for dispatchtbl.
#define BLPAPI_CALL(FUNCNAME)
Definition blpapi_call.h:353
Represents a date and/or time.
Common definitions used by the library.
#define BLPAPI_EXPORT
Definition blpapi_defs.h:171
BLPAPI_EXPORT int blpapi_Logging_configureLogging(int level, const char *fileName, int rolloverFileCount, int rolloverFileLimit)
BLPAPI_EXPORT void blpapi_Logging_logTestMessage(blpapi_Logging_Severity_t severity)
BLPAPI_EXPORT int blpapi_Logging_registerCallback(blpapi_Logging_Func_t callback, blpapi_Logging_Severity_t thresholdSeverity)
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
unsigned long long blpapi_UInt64_t
Definition blpapi_types.h:70
blpapi_Logging_Severity_t
Definition blpapi_types.h:116
@ blpapi_Logging_SEVERITY_WARN
Definition blpapi_types.h:120
@ blpapi_Logging_SEVERITY_TRACE
Definition blpapi_types.h:123
@ blpapi_Logging_SEVERITY_FATAL
Definition blpapi_types.h:118
@ blpapi_Logging_SEVERITY_DEBUG
Definition blpapi_types.h:122
@ blpapi_Logging_SEVERITY_ERROR
Definition blpapi_types.h:119
@ blpapi_Logging_SEVERITY_OFF
Definition blpapi_types.h:117
@ blpapi_Logging_SEVERITY_INFO
Definition blpapi_types.h:121
Definition blpapi_abstractsession.h:195
Definition blpapi_logging.h:169
Type
Enumeration used to specify different logging severity levels.
Definition blpapi_logging.h:171
@ e_trace
TRACE.
Definition blpapi_logging.h:179
@ e_info
INFO.
Definition blpapi_logging.h:177
@ e_error
ERROR.
Definition blpapi_logging.h:175
@ e_debug
DEBUG.
Definition blpapi_logging.h:178
@ e_warn
WARN.
Definition blpapi_logging.h:176
@ e_fatal
FATAL.
Definition blpapi_logging.h:174
@ e_off
OFF.
Definition blpapi_logging.h:173
Definition blpapi_logging.h:167
static void logTestMessage(Severity::Type severity)
Definition blpapi_logging.h:203
Definition blpapi_datetime.h:102