Set the log level for the specified modules.
The log level for a module overrides the primary log level
of Logger for log events originating from the module in
question. Notice, however, that it does not override the
level configuration for any handler.
For example: Assume that the primary log level for Logger
is info, and there is one handler, h1, with
level info and one handler, h2, with
level debug.
With this configuration, no debug messages will be logged,
since they are all stopped by the primary log level.
If the level for mymodule is now set
to debug, then debug events from this module will be
logged by the handler h2, but not by
handler h1.
Debug events from other modules are still not logged.
To change the primary log level for Logger, use
set_primary_config(level, Level).
To change the log level for a handler, use
set_handler_config(HandlerId, level, Level)
.
Note
The originating module for a log event is only detected
if the key mfa exists in the metadata, and is
associated with {Module, Function, Arity}. When log
macros are used, this association is automatically added
to all log events. If an API function is called directly,
without using a macro, the logging client must explicitly
add this information if module levels shall have any
effect.