Python script Logging

Hello,

I need some help with the logging of a python script. The script is already working the half way, but I need some logging from the script.

I already enabled the logging in Home assistant in the configuration.yaml

logger:
  default: warning
  logs:
  homeassistant.components.python_scripts: debug

In the python script I also have some logging. For example:
logger.info (“Licht wird heller gestellt”)

After the configuration I restarted the home assistant, but I can’t find any logs, after I call the python script service, in the home-assistant.log

Thank you for your help.

Could be due to indentation error in your logger config. Also, based on a test I just ran with one of mine, you should drop the ‘s’ at the end. So, I think it should be:

logger:
  default: warning
  logs:
    homeassistant.components.python_script: debug

That was a really stupid mistake. Thank you for your help.