mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-27 02:01:53 +01:00
move BlitzTUI log
This commit is contained in:
parent
46cfdb26c3
commit
7b019e4fee
1
home.admin/BlitzTUI/.gitignore
vendored
1
home.admin/BlitzTUI/.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
BlitzTUI.egg-info/*
|
||||
build/*
|
||||
dist/*
|
||||
|
@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.48.0] - 2020-05-30
|
||||
### Add
|
||||
- move log file to /var/cache/raspiblitz/ if it exists
|
||||
|
||||
## [0.47.0] - 2020-05-23
|
||||
### Removed
|
||||
- remove config.py as it has been moved to the dedicated package BlitzPy
|
||||
|
@ -1,3 +1,4 @@
|
||||
import getpass
|
||||
import json
|
||||
import logging
|
||||
import logging.config
|
||||
@ -20,7 +21,14 @@ def setup_logging(default_path=os.path.abspath(os.path.expanduser('~/.blitz-tui.
|
||||
if IS_WIN32_ENV:
|
||||
log_file = "blitz-tui.log"
|
||||
else:
|
||||
log_file = os.path.abspath(os.path.expanduser('~/blitz-tui.log'))
|
||||
if os.path.isdir('/var/cache/raspiblitz'):
|
||||
try:
|
||||
os.mkdir('/var/cache/raspiblitz/{}'.format(getpass.getuser()))
|
||||
except FileExistsError:
|
||||
pass
|
||||
log_file = os.path.abspath('/var/cache/raspiblitz/{}/blitz-tui.log'.format(getpass.getuser()))
|
||||
else:
|
||||
log_file = os.path.abspath(os.path.expanduser('~/blitz-tui.log'))
|
||||
|
||||
default_config_as_dict = dict(
|
||||
version=1,
|
||||
@ -36,8 +44,8 @@ def setup_logging(default_path=os.path.abspath(os.path.expanduser('~/.blitz-tui.
|
||||
'level': log_level,
|
||||
'formatter': 'extended',
|
||||
'filename': log_file,
|
||||
'maxBytes': 10485760,
|
||||
'backupCount': 0,
|
||||
# 'maxBytes': 2*1024*1024, # 2 MB
|
||||
'backupCount': 1,
|
||||
'encoding': 'utf8'}},
|
||||
loggers={'infoblitz': {'level': 'DEBUG',
|
||||
'handlers': ['console', 'file_handler'],
|
||||
|
@ -4,5 +4,5 @@
|
||||
# 3) we can import it into your module module
|
||||
"""
|
||||
|
||||
__version_info__ = ('0', '47', '0')
|
||||
__version_info__ = ('0', '48', '0')
|
||||
__version__ = '.'.join(__version_info__)
|
||||
|
BIN
home.admin/BlitzTUI/dist/BlitzTUI-0.48.0-py2.py3-none-any.whl
vendored
Normal file
BIN
home.admin/BlitzTUI/dist/BlitzTUI-0.48.0-py2.py3-none-any.whl
vendored
Normal file
Binary file not shown.
BIN
home.admin/BlitzTUI/dist/BlitzTUI-0.48.0.tar.gz
vendored
Normal file
BIN
home.admin/BlitzTUI/dist/BlitzTUI-0.48.0.tar.gz
vendored
Normal file
Binary file not shown.
@ -164,7 +164,11 @@ do
|
||||
recheckBlitzTUI=$(($counter % 30))
|
||||
if [ "${touchscreen}" == "1" ] && [ ${recheckBlitzTUI} -eq 1 ]; then
|
||||
echo "BlitzTUI Monitoring Check"
|
||||
latestHeartBeatLine=$(sudo tail -n 300 /home/pi/blitz-tui.log | grep beat | tail -n 1)
|
||||
if [ -d "/var/cache/raspiblitz" ]; then
|
||||
latestHeartBeatLine=$(sudo tail -n 300 /var/cache/raspiblitz/pi/blitz-tui.log | grep beat | tail -n 1)
|
||||
else
|
||||
latestHeartBeatLine=$(sudo tail -n 300 /home/pi/blitz-tui.log | grep beat | tail -n 1)
|
||||
fi
|
||||
if [ ${#blitzTUIHeartBeatLine} -gt 0 ]; then
|
||||
#echo "blitzTUIHeartBeatLine(${blitzTUIHeartBeatLine})"
|
||||
#echo "latestHeartBeatLine(${latestHeartBeatLine})"
|
||||
|
Loading…
x
Reference in New Issue
Block a user