mirror of
https://github.com/mtan93/homeassistant-addons.git
synced 2026-04-18 06:13:10 +01:00
Add log_level cofiguration option
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
## [0.5.0] - 2021-01-02
|
## [0.5.0] - 2021-01-02
|
||||||
- Improve image recration by adding some cache buster
|
- Improve image recration by adding some cache buster
|
||||||
- Change to bashio logs
|
- Change to bashio logs
|
||||||
|
- Add `log_level` cofiguration option
|
||||||
|
|
||||||
## [0.4.0] - 2021-01-02
|
## [0.4.0] - 2021-01-02
|
||||||
- Change base image to `hassioaddons/debian-base`
|
- Change base image to `hassioaddons/debian-base`
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bashio
|
#!/usr/bin/env bashio
|
||||||
|
|
||||||
|
bashio::log.info "Exporting log level for nodejs: $(bashio::config log_level)"
|
||||||
|
export NODE_CONSOLE_LOG_LEVEL=`bashio::config log_level`
|
||||||
|
|
||||||
bashio::log.info "Symlinking data dir"
|
bashio::log.info "Symlinking data dir"
|
||||||
mkdir -p /share/eufy-ha-mqtt-bridge/data
|
mkdir -p /share/eufy-ha-mqtt-bridge/data
|
||||||
rm -rf /app/data
|
rm -rf /app/data
|
||||||
@@ -10,8 +13,6 @@ echo '# Generated by homeassistant, do not edit!' > /app/data/config.yml
|
|||||||
echo '# Edit configuration only at the Add-on configuration tab!' >> /app/data/config.yml
|
echo '# Edit configuration only at the Add-on configuration tab!' >> /app/data/config.yml
|
||||||
json2yml /data/options.json >> /app/data/config.yml
|
json2yml /data/options.json >> /app/data/config.yml
|
||||||
|
|
||||||
echo 'patching console log level'
|
|
||||||
sed -i "s/level: process.env.NODE_ENV === 'production' ? 'error' : 'debug'\,/level: 'info',/" /app/index.js
|
|
||||||
|
|
||||||
bashio::log.info "starting original stuff..."
|
bashio::log.info "starting original stuff..."
|
||||||
npm run start
|
npm run start
|
||||||
Reference in New Issue
Block a user