Logging
This secion presents the logging options available to diagnose issues during development or deployment.
Initializing Logging
The logging options are configured when calling Library.init().
There are two log level parameters to consider:
The api_log_level parameter configures the logging of errors and warnings from API functions. It is recommended to set this to LogLevel.Warning during development to detect possible API usage errors as early as possible.
The internal_log_level 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 log_targets parameter defines where the log output will be written to. It is also possible to direct logging messages to LogTarget.STDOUT or a log LogTarget.FILE specified by the log_file argument.
Multiple log targets can be enabled at the same time by forming a bitwise combination of LogTarget flags.