Hi, I’ve seen several topics with reference to former config and the /config folder. I’ma a new comer on Appdaemon (and ha) and I would like to enable logs with the recommended way.
My appdaemon.yaml file is located in the folder /root/addon_configs/a0d7b954_appdaemon/ so I’m trying to add error.log and appdaemon .log files.
I've added the log files as below in the appdaemon.yaml file:
logs:
main_log:
filename: /addon_configs/a0d7b954_appdaemon/logs/appdaemon.log
error_log:
filename: /addon_configs/a0d7b954_appdaemon/logs/error.log
I’ve tried several paths:
/addon_configs/a0d7b954_appdaemon/logs/
/root/addon_configs/a0d7b954_appdaemon/logs/
/loghs/
But Appdaemon fails to start with the error below:
Let me know if you understand what could be my problem.
Thank you for your help.
-----------------------------------------------------------
Add-on: AppDaemon
Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
Add-on version: 0.16.4
You are running the latest version of this add-on.
System: Home Assistant OS 12.0 (amd64 / qemux86-64)
Home Assistant Core: 2024.2.5
Home Assistant Supervisor: 2024.02.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-appdaemon: starting
s6-rc: info: service init-appdaemon successfully started
s6-rc: info: service appdaemon: starting
s6-rc: info: service appdaemon successfully started
s6-rc: info: service legacy-services: starting
[22:36:09] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
Traceback (most recent call last):
File "/usr/bin/appdaemon", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/appdaemon/__main__.py", line 417, in main
admain.main()
File "/usr/lib/python3.11/site-packages/appdaemon/__main__.py", line 358, in main
self.logging = logging.Logging(logs, args.debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/appdaemon/logging.py", line 290, in __init__
handler = RotatingFileHandler(
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/logging/handlers.py", line 155, in __init__
BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding,
File "/usr/lib/python3.11/logging/handlers.py", line 58, in __init__
logging.FileHandler.__init__(self, filename, mode=mode,
File "/usr/lib/python3.11/logging/__init__.py", line 1181, in __init__
StreamHandler.__init__(self, self._open())
^^^^^^^^^^^^
File "/usr/lib/python3.11/logging/__init__.py", line 1213, in _open
return open_func(self.baseFilename, self.mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/logs/appdaemon.log'
[22:36:15] INFO: Service AppDaemon exited with code 1 (by signal 0)