2017-02-27 11:32:36 +01:00

1.6 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category
layout title description date sidebar comments sharing footer logo ha_category
page Logger Instructions how to enable the logger component for Home Assistant. 2015-11-12 17:00 true false true true home-assistant.png Other

The logger component lets you define the level of logging activities in Home Assistant.

To enable the logger in your installation, add the following to your configuration.yaml file:

To have a full log and log everything only this entry is needed (without any qualifier):

logger:

To log all messages and ignore events lower than critical for specified components.

# Example configuration.yaml entry
logger:
  default: info
  logs:
    homeassistant.components.device_tracker: critical
    homeassistant.components.camera: critical

To ignore all messages lower than critical and log event for specified components.

# Example configuration.yaml entry
logger:
  default: critical
  logs:
    homeassistant.components: info
    homeassistant.components.rfxtrx: debug
    homeassistant.components.device_tracker: critical
    homeassistant.components.camera: critical

Possible log severities are:

  • critical
  • fatal
  • error
  • warning
  • warn
  • info
  • debug
  • notset

{% linkable_title Service set_level %}

You can alter log level for one or several components using the service logger.set_level. It accepts the same format as logs in the configuration.

An example call might look like this:

service: logger.set_level
data:
  homeassistant.components: warning
  homeassistant.components.media_player.yamaha: debug