Set DEBUG in appdaemon.yaml

Is there a way to run appdaemon in DEBUG mode (like -d DEBUG) with a appdaemon.yaml line? I tried log_level: DEBUG but it doesn’t seem to work.

Why? I am running appdaemon with docker-compose and it is harder to set command line options there. (I’m sure there is a way but my initial foray with command: -d DEBUG did not work.

Hey @rr326,

Since AppDaemon 4.0, you can set log levels to individual apps like:

example_app:
  module: your_module
  class: your_class
  log_level: DEBUG

Hope this helps,
Xavi M.

Thanks @xaviml. But I’m looking for the global, not app-sepcific, debug mode. I’m trying to figure out why my appdaemon keeps disconnecting, and why the Dashboard is so insanely slow (> 60 sec to load).

For future reference. Here is a mediocre but working solution:

  1. from outside your container: docker exec -it appdaemon /bin/sh
  2. from inside the container: /usr/bin/vi dockerStart.sh
  3. Change the last line to: exec appdaemon -c $CONF -D DEBUG "$@"
  4. Then restart your container.

Ugly, but works.

My docker-compse.yml:

  appdaemon:
    container_name: appdaemon
    restart: "unless-stopped"
    image: appdaemon:latest # See documentation to build
    volumes:
      - ../homeassistant/appdaemon/conf:/conf
    depends_on:
      - homeassistant
    network_mode: host
1 Like