The log handler captures errors and warnings that arise from OpenTelemetry's C++ SDK as well as some application errors.
By default, logging is disabled. You can configure the behavior of OpenTelemetry logging using the MFOTL_DEBUGLOG environment variable:
set MFOTL_DEBUGLOG=<log_file_name>[;<log_level>]
You can use the following pseudo-variables for the construction of the log file name:
For example, the following redirects log and error messages to a file that include the process name and pid:
set MFOTL_DEBUGLOG=/tmp/$(APPNAME).mfotl_debuglog.$(PID).log
In order to redirect log and error messages to the console, set the MFOTL_DEBUGLOG environment variable to console. For example:
set MFOTL_DEBUGLOG=console
Optionally, you can specify the log level to use. It can be one of the following values:
To specify a different log level append ;<log-level> to the value of the MFOTL_DEBUGLOG_LEVEL environment variable, for example:
set MFOTL_DEBUGLOG=/tmp/$(APPNAME).mfotl_debuglog.$(PID).log;info
Or:
set MFOTL_DEBUGLOG=console;debug