The SDK logs appropriate information to support the software if issues arise. As the SDK may be located on non-secure hardware and may be submitted to a help desk for analysis, the log files should contain no sensitive information, such as passwords.
The initialization process will initialise all library modules to a default log level of warning. If overriding log levels, do this after the initialization methods have been called.
The SDK code makes various logging calls that can be controlled, separately, by the logging level of individual SDKs (libraries) and their modules. The level of each library/module can be set using:
The default logging function is controlled by some settings in the configuration file. However the entire logging function can be replaced by setting a callback using:
For example:
The log levels are defined in ato_eLoglevel.
This is a general rational for the logging levels.
Logging Level | Intended Audience | Best Practice |
Off | Developer | Useful for targetting logging for individual submodules |
Fatal, Error, Warning | End-User | Events logged at this level are for messages reported back to an end-user when something has gone wrong. These correspond to the severity codes in @ref atobase_error "error handling" |
Information | Testing, Tech Support | Use events logged at this level to debug issues during testing, and to provide technical support to external clients. Log all operations supporting business functionality, including progress and status type information as Information messages |
Debug, Trace | Developer | This is for development use. Log full parameter lists, extra information and, in the case of Trace, method entry/exit |
All | Developer | Useful for targetting logging for individual submodules |