# salt.modules.logmod

## On-demand logging

New in version 2017.7.0.

The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example:

    {%- for var in range(10) %}
      {%- do salt["log.info"](var) -%}
    {%- endfor %}

CLI Example:

    salt '*' log.error "Please don't do that, this module is not for CLI use!"

salt.modules.logmod.critical(message)

  Log message at level CRITICAL.

salt.modules.logmod.debug(message)

  Log message at level DEBUG.

salt.modules.logmod.error(message)

  Log message at level ERROR.

salt.modules.logmod.exception(message)

  Log message at level EXCEPTION.

salt.modules.logmod.info(message)

  Log message at level INFO.

salt.modules.logmod.warning(message)

  Log message at level WARNING.