86 lines
3.1 KiB
C++
86 lines
3.1 KiB
C++
/*
|
|
* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
|
|
*
|
|
* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
|
|
* and international copyright treaties.
|
|
*
|
|
* Access to and use of the software is governed by the terms of the applicable OnixS Software
|
|
* Services Agreement (the Agreement) and Customer end user license agreements granting
|
|
* a non-assignable, non-transferable and non-exclusive license to use the software
|
|
* for it's own data processing purposes under the terms defined in the Agreement.
|
|
*
|
|
* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
|
|
* of this source code or associated reference material to any other location for further reproduction
|
|
* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
|
|
*
|
|
* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
|
|
* the terms of the Agreement is a violation of copyright law.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <OnixS/ICE/iMpact/MarketData/ABI.h>
|
|
|
|
namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
|
|
|
|
/// Log level.
|
|
struct ONIXS_ICE_IMPACT_MD_API LogLevels
|
|
{
|
|
enum Enum
|
|
{
|
|
Fatal, ///< Fatal error, cannot continue.
|
|
Error, ///< System error, but we can go on.
|
|
Warning, ///< User or logic error, just say about it.
|
|
Info, ///< Information messages.
|
|
Trace, ///< Used for tracing.
|
|
Debug, ///< Used for debugging.
|
|
};
|
|
|
|
/// Returns string representation of a state.
|
|
static const char* toString(Enum state);
|
|
};
|
|
|
|
/// Log level alias.
|
|
typedef LogLevels::Enum LogLevel;
|
|
|
|
/// Additional options to control log information.
|
|
struct ONIXS_ICE_IMPACT_MD_API AdvancedLogOptions
|
|
{
|
|
/// \copydoc AdvancedLogOptions
|
|
enum Enum
|
|
{
|
|
/// Nothing except standard information must be logged.
|
|
LogNothing = 0x00,
|
|
|
|
/// Trace to the log file.
|
|
TraceToFile = 0x01,
|
|
|
|
/// Trace to the console.
|
|
///
|
|
/// \note Messages with LogLevel::Trace and LogLevel::Debug are not duplicated to console.
|
|
TraceToConsole = 0x02,
|
|
|
|
/// Enable asynchronous logging.
|
|
///
|
|
/// \note Instead of direct output to file or console, Handler put log message into
|
|
/// interthread queue, that will be processed by auxilary thread.
|
|
Async = 0x04,
|
|
|
|
/// Use local time instead of UTC
|
|
LocalTime = 0x40,
|
|
|
|
/// Default log settings.
|
|
Default = TraceToFile
|
|
};
|
|
|
|
/// Returns string representation of a state.
|
|
static std::string toString(Enum state);
|
|
};
|
|
|
|
/// Additional options to control log information.
|
|
typedef unsigned AdvancedLogOptionSet;
|
|
|
|
}}}} // namespace MarketData, iMpact, ICE, OnixS
|