To configure logging the Handler provides the following settings.
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:
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:
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.
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:
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.
To completely disable logging the user should set OnixS::ICE::iMpact::MarketData::HandlerSettings::advancedLogOptions to OnixS::ICE::iMpact::MarketData::AdvancedLogOptions::LogNothing. For example:
In result, all other logging settings will be ignored and the Handler completely disables the logging subsystem.
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:
By default, the Handler uses synchronous logger. But the user can change this and use asynchronous logger by using the following option:
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: