Logging
This secion presents the logging options available to diagnose issues during development or deployment.
Initialize Logging
The logging options are configured when calling ic4::initLibrary.
There are two log level parameters to consider:
The apiLogLevel parameter configures the logging of errors and warnings from API functions. It is recommended to set this to ic4::LogLevel::Warning during development to detect possible API usage errors as early as possible.
The internalLogLevel parameter can be used to enable internal logging. This is mostly useful to debug unexpected behavior and should be used carefully, as it can slow down operation.
The logTarget parameter defines where the log output will be written to. When using Microsoft Visual Studio, setting this to ic4::LogTarget::WinDebug is recommended to receive log output in the debugger's output window. It is also possible to direct logging messages to ic4::LogTarget::StdOut or a log file. Multiple log targets can be enabled at the same time by forming a bitwise combination of ic4::LogTarget flags.