OnixS C++ CME MDP Streamlined Market Data Handler 1.2.0
API Documentation
Loading...
Searching...
No Matches
Logger.h
Go to the documentation of this file.
1// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2//
3// This software owned by Onix Solutions Limited [OnixS] and is
4// protected by copyright law and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable
7// OnixS Software Services Agreement (the Agreement) and Customer end user license
8// agreements granting a non-assignable, non-transferable and non-exclusive license
9// to use the software for it's own data processing purposes under the terms defined
10// in the Agreement.
11//
12// Except as otherwise granted within the terms of the Agreement, copying or
13// reproduction of any part of this source code or associated reference material
14// to any other location for further reproduction or redistribution, and any
15// amendments to this copyright notice, are expressly prohibited.
16//
17// Any reproduction or redistribution for sale or hiring of the Software not in
18// accordance with the terms of the Agreement is a violation of copyright law.
19//
20
21#pragma once
22
25
27
30{
32 typedef UInt32 Base;
33
35 enum Enum
36 {
42 Important = 10,
43
51 Regular = 50,
52
57 Debug = 100
58 };
59};
60
63void
65 std::string&,
67
69inline
70std::string
73{
74 std::string str;
75
76 toStr(str, mode);
77
78 return str;
79}
80
83bool
86 const Char*,
87 size_t);
88
91{
92 // Enumeration base.
93 typedef UInt32 Base;
94
96 enum Enum
97 {
100
103
106
109 };
110};
111
114void
116 std::string&,
118
120inline
121std::string
124{
125 std::string str;
126
127 toStr(str, mode);
128
129 return str;
130}
131
134bool
137 const Char*,
138 size_t);
139
142{
143public:
145 virtual void category(LogCategory::Enum) = 0;
146
148 virtual void source(const StrRef&) = 0;
149
151 virtual std::string& message() = 0;
152
158 virtual void commit() = 0;
159
160protected:
163 {
164 }
165
168 {
169 }
170
171private:
172 // Object copying is not supposed.
173
174 LogEntry(const LogEntry&);
175 LogEntry& operator =(const LogEntry&);
176};
177
180{
181 // Object copying is not supposed.
182
183 Logger(const Logger&);
184 Logger& operator =(const Logger&);
185
186protected:
189 {
190 }
191
193 virtual ~Logger()
194 {
195 }
196
197public:
207 virtual
208 LogEntry*
211};
212
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED_CLASS
Definition Bootstrap.h:63
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:169
#define ONIXS_CMESTREAMLINEDMDH_LTWT_STRUCT
Definition Bootstrap.h:115
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
Definition Compiler.h:160
Abstraction of log entry in logging services.
Definition Logger.h:142
virtual std::string & message()=0
Editable text to be a message of log entry.
~LogEntry()
Life-time is managed by Logger.
Definition Logger.h:167
LogEntry()
Life-time is managed by Logger.
Definition Logger.h:162
virtual void commit()=0
Commits entry into a log and releases the instance.
virtual void category(LogCategory::Enum)=0
Specifies category of information being logged.
virtual void source(const StrRef &)=0
Specifies source of information being logged.
Logger()
Only descendants are to be created.
Definition Logger.h:188
virtual ~Logger()
Only descendants are to be created.
Definition Logger.h:193
virtual LogEntry * addEntry(LogSeverity::Enum)=0
Adds entry to the log.
Provides efficient way of accessing text-based FIX field values.
Definition String.h:40
char Char
Character type alias.
Definition String.h:36
void toStr(std::string &str, const Decimal &number)
Definition Decimal.h:502
bool fromStr(Decimal &, const char *, size_t)
Categories for information being logged.
Definition Logger.h:91
Enum
Categories for information being logged.
Definition Logger.h:97
@ Info
Log entry represents informational message.
Definition Logger.h:105
@ Warning
Log entry represents a warning.
Definition Logger.h:102
@ Error
Log entry represents an error.
Definition Logger.h:99
@ Debug
Log entry represents debug information.
Definition Logger.h:108
Defines severity levels for log entries.
Definition Logger.h:30
@ Regular
Handler will log miscellaneous aspects related with its execution like changes in state,...
Definition Logger.h:51
@ Important
Only important information like warnings and errors will be logged.
Definition Logger.h:42
@ Debug
In addition to the data logged in 'Regular' mode, Handler will output additional information like ste...
Definition Logger.h:57
UInt32 Base
Enumeration base.
Definition Logger.h:32