Files
EOS/docs/akkudoktoreos/logging.md
Bobby Noelte d446274129
Some checks are pending
Bump Version / Bump Version Workflow (push) Waiting to run
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run
fix: Adapt versioning scheme to Home Assistant and switch to uv (#896)
Home Assistant expects versioning always increases numbers. Add
a date component to the development version to comply with this
expectation. The scheme is now 0.0.0.dev<date><hash>.

Use uv for creating and managing the virtual environment for developement.
This enourmously speeds up dependency updates. For this change
dependency requirements are now solely handled in pyproject.toml.
requirements.tx and requirements-dev.txt are deleted.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2026-02-23 20:59:03 +01:00

1.8 KiB
Raw Blame History

% SPDX-License-Identifier: Apache-2.0 (logging-page)=

Logging

EOS automatically records important events and messages to help you understand whats happening and to troubleshoot problems.

How Logging Works

  • By default, logs are shown in your terminal (console).
  • You can also save logs to a file for later review.
  • Log files are rotated automatically to avoid becoming too large.

Controlling Log Details

1. Command-Line Option

Set the amount of log detail shown on the console by using --log-level when starting EOS.

Example:

.. tabs::

  .. tab:: Windows

     .. code-block:: powershell

        uv run python src/akkudoktoreos/server/eos.py --log-level DEBUG

  .. tab:: Linux

     .. code-block:: bash

        uv run python src/akkudoktoreos/server/eos.py --log-level DEBUG

Common levels:

  • DEBUG (most detail)
  • INFO (default)
  • WARNING
  • ERROR
  • CRITICAL (least detail)

2. Configuration File

You can also set logging options in your EOS configuration file (EOS.config.json).

{
  "logging": {
    "console_level": "INFO",
    "file_level": "DEBUG"
  }
}

3. Environment Variable

You can also control the log level by setting the EOS_LOGGING__CONSOLE_LEVEL and the EOS_LOGGING__FILE_LEVEL environment variables.

  EOS_LOGGING__CONSOLE_LEVEL="INFO"
  EOS_LOGGING__FILE_LEVEL="DEBUG"

File Logging

If the file_level configuration is set, log records are written to a rotating log file. The log file is in the data output directory and named eos.log. You may directly read the file or use the /v1/logging/log endpoint to access the file log.

:::{admonition} Note :class: note The /v1/logging/log endpoint needs file logging to be enabled. Otherwise old or no logging information is provided. :::