ha-enthus1ast / plejd-mqtt-ha

Plejd MQTT
Apache License 2.0
1 stars 0 forks source link

Feature: Added support for writing logs to file #10

Closed ha-enthus1ast closed 9 months ago

ha-enthus1ast commented 9 months ago

This PR aims to introduce support for writing logs to files.

Log files are now stored in the config/logs-directory. One log file is created for the main application and one for the healthcheck application. Log file path and/or log level can be set from the environment. Logsize and log backup count are set as constants, as I saw no reason to expose those as neither setting nor as an env var

As a bonus this also solves the healthcheck bug

This should solve #9 and #8

github-actions[bot] commented 9 months ago

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.03s
✅ BASH bash-exec 1 0 0.0s
✅ BASH shellcheck 1 0 0.02s
✅ BASH shfmt 1 0 0 0.01s
✅ DOCKERFILE hadolint 1 0 0.12s
✅ JSON eslint-plugin-jsonc 2 0 0 1.05s
✅ JSON jsonlint 2 0 0.14s
✅ JSON prettier 2 0 0 0.45s
✅ JSON v8r 2 0 2.2s
✅ MARKDOWN markdownlint 4 0 0 0.96s
✅ MARKDOWN markdown-link-check 4 0 2.02s
✅ MARKDOWN markdown-table-formatter 4 0 0 0.3s
✅ PYTHON bandit 14 0 1.0s
✅ PYTHON black 18 0 0 1.06s
✅ PYTHON flake8 18 0 0.58s
✅ PYTHON isort 18 0 0 0.3s
✅ PYTHON pylint 18 0 14.04s
✅ PYTHON ruff 18 0 0 0.03s
✅ REPOSITORY gitleaks yes no 0.03s
✅ REPOSITORY git_diff yes no 0.0s
✅ REPOSITORY grype yes no 13.26s
✅ REPOSITORY secretlint yes no 0.76s
✅ REPOSITORY trivy yes no 6.81s
✅ REPOSITORY trivy-sbom yes no 3.6s
✅ REPOSITORY trufflehog yes no 1.62s
✅ SPELL lychee 11 0 1.19s
✅ YAML prettier 5 0 0 0.59s
✅ YAML v8r 5 0 11.45s
✅ YAML yamllint 5 0 0.26s

See detailed report in MegaLinter reports

_MegaLinter is graciously provided by OX Security_