OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.10.0
API documentation
LogSettings.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Onix Solutions Limited. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited and is protected by copyright law
5  * and international copyright treaties.
6  *
7  * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8  * Services Agreement (the Agreement) and Customer end user license agreements granting
9  * a non-assignable, non-transferable and non-exclusive license to use the software
10  * for it's own data processing purposes under the terms defined in the Agreement.
11  *
12  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13  * of this source code or associated reference material to any other location for further reproduction
14  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15  *
16  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17  * the terms of the Agreement is a violation of copyright law.
18  */
19 
20 #pragma once
21 
22 #include "Export.h"
23 
24 #include <string>
25 
26 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
27 
28 /// Log level.
29 struct ONIXS_ICEMDH_EXPORT LogLevels
30 {
31  enum Enum
32  {
33  Fatal, ///< Fatal error, cannot continue.
34  Error, ///< System error, but we can go on.
35  Warning, ///< User or logic error, just say about it.
36  Info, ///< Information messages.
37  Trace, ///< Used for tracing.
38  Debug, ///< Used for debugging.
39  };
40 
41  /// Returns string representation of a state.
42  static const char* toString(Enum state);
43 };
44 
45 /// Log level alias.
47 
48 /// Additional options to control log information.
49 struct ONIXS_ICEMDH_EXPORT AdvancedLogOptions
50 {
51  /// \copydoc AdvancedLogOptions
52  enum Enum
53  {
54  /// Nothing except standard information must be logged.
55  LogNothing = 0x00,
56 
57  /// Trace to the log file.
58  TraceToFile = 0x01,
59 
60  /// Trace to the console.
61  ///
62  /// \note Messages with LogLevel::Trace and LogLevel::Debug are not duplicated to console.
63  TraceToConsole = 0x02,
64 
65  /// Enable asynchronous logging.
66  ///
67  /// \note Instead of direct output to file or console, Handler put log message into
68  /// interthread queue, that will be processed by auxiliary thread.
69  Async = 0x04,
70 
71  /// Use local time instead of UTC.
72  LocalTime = 0x40,
73 
74  /// Rotate log file on restart of the Handler.
75  RotateOnRestart = 0x80,
76 
77  /// Default log settings.
78  Default = TraceToFile
79  };
80 
81  /// Returns string representation of a state.
82  static std::string toString(Enum state);
83 };
84 
85 /// Additional options to control log information.
86 typedef unsigned AdvancedLogOptionSet;
87 
88 }}}} // namespace MarketData, iMpact, ICE, OnixS
LogLevels::Enum LogLevel
Log level alias.
Definition: LogSettings.h:46
Enum
Additional options to control log information.
Definition: LogSettings.h:52
unsigned AdvancedLogOptionSet
Additional options to control log information.
Definition: LogSettings.h:86
System error, but we can go on.
Definition: LogSettings.h:34
Additional options to control log information.
Definition: LogSettings.h:49
User or logic error, just say about it.
Definition: LogSettings.h:35