OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.5.1
API documentation
Logging Services

To configure logging the Handler provides the following settings.

Log Directory

To set a path to a directory where log files will be stored a user can use OnixS::ICE::iMpact::MarketData::HandlerSettings::logDirectory.

By default, the value for this setting is "./" (the current directory). Here is an example how to set path to the log directory:

1 handlerSettings.logDirectory = "logs";

Log File Name Prefix

The Handler provides an ability to set a prefix for the log file name. By default, the Handler uses "IceImpactMulticastPriceFeedHandlerCpp" as a prefix for the log file name. The user can use OnixS::ICE::iMpact::MarketData::HandlerSettings::logFileNamePrefix to set a new prefix. For example:

1 handlerSettings.logFileNamePrefix = "log";

Log Level

The Handler provides the following log levels:

We expected the user will use Info log level or above in normal conditions and Debug if we need to debug some Handler's issue.

Avoid usage of Debug log level in Production.

By default, the Handler uses OnixS::ICE::iMpact::MarketData::LogLevels::Info. To set another log level the user can use OnixS::ICE::iMpact::MarketData::HandlerSettings::logLevel. For example:

1 handlerSettings.logLevel = LogLevels::Debug;

Advanced Log Options

The Handler provides additional options to control various aspects of. the logging subsystem. By default, the Handler sets OnixS::ICE::iMpact::MarketData::HandlerSettings::advancedLogOptions to OnixS::ICE::iMpact::MarketData::AdvancedLogOptions::Default which means trace to a file only. Please see another available options below.

Disable Logging

To completely disable logging the user should set OnixS::ICE::iMpact::MarketData::HandlerSettings::advancedLogOptions to OnixS::ICE::iMpact::MarketData::AdvancedLogOptions::LogNothing. For example:

1 handlerSettings.advancedLogOptions = AdvancedLogOptions::LogNothing;

In result, all other logging settings will be ignored and the Handler completely disables the logging subsystem.

Log Output

The Handler provides two options to choose where the user wants to see the logs - in a file and/or in the console. To make the logs available in both places the user can do the following:

1 handlerSettings.advancedLogOptions = AdvancedLogOptions::TraceToFile | AdvancedLogOptions::TraceToConsole;

Asynchronous Logging

By default, the Handler uses synchronous logger. But the user can change this and use asynchronous logger by using the following option:

1 handlerSettings.advancedLogOptions |= AdvancedLogOptions::Async;

Timestamps In Local Time

By default, the Handler uses UTC for timestamps of log records. This can be changed so the user can see timestamps in the local timezone. To make this change the user should add the following option:

1 handlerSettings.advancedLogOptions |= AdvancedLogOptions::LocalTime;