Log Properties

Description Control the Ioto log file.
Synopsis log: { path: 'path', format: 'format', types: 'types', sources: 'sources' }
Example log: { path: '/var/log/ioto.log', format: '%D %H %A[%P] %T %S %M', types: 'error,info', sources: 'all', },

The log property collection defines how and where Ioto logs execution information and trace.

The log.path property specifies the destination of the Ioto log. Set it to "stdout" or "stderr", "aws" or a filename. If set to "aws", then the log.group property specifies the AWS log group name and the log.stream property specifies the AWS log stream name.

The format specifies a leading format for the message that contains printf style tokens that are expanded at runtime. The supported tokens are: 'A' for the application name, 'D' for the local datetime, 'H' for the system hostname, 'M' for the log message, 'P' for the process ID , 'S' for the message source, and 'T' for the log message type.

The types property specifies the types of log messages to emit. It may contain the following types: debug, error, info and trace. It may be set to "all" for all types.

The sources property specifies a comma separated list of log message sources to emit. Sources may be prefixed with "!" to subtract from the list. For example: "all,!mbedtls" will emit log messages from all sources except "mbedtls".

© Embedthis Software. All rights reserved.