Kernel

Reference Manual

Version 5.4.1

Table of Contents

logger_std_h

Module

logger_std_h

Module Summary

Default handler for the Logger application.

Description

This is the default handler for the Logger application. Multiple instances of this handler can be added to logger, and each instance will print logs to standard_io, standard_error or to a file.

To add a new instance, use logger:add_handler/3.

The handler configuration may contain the following keys, associated with values as described:

filters

A list of {Id,{Fun,Args}}, each representing a filter that may selct or modify log events to forward to this handler.

filter_default

The atom log or stop, specifying what to do with a log event if all filters return ignore.

formatter

{Module,Extra}, where Module:format(Log,Extra) will be called by the handler to produce the string that will be printed to the handler's destination.

level

The level of log events that logger shall forward to this handler. Log events of the specified, or more severe levels, are forwarded.