fix: resolve v1.11.0 log location bugs in baremetal and docker setups (#450)

This commit is contained in:
HODLmeTight 2026-06-22 16:19:32 +02:00 committed by GitHub
parent abb1f5840a
commit 8d23951d26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 9 deletions

View file

@ -78,7 +78,7 @@ services:
- sh
- -c
# Customize network ('mainnet' or 'testnet') and RPC address/port if needed
- python initialize.py -net 'mainnet' -rpc '127.0.0.1:10009' -wn && python controller.py runserver 0.0.0.0:8889 > /var/log/lndg-controller.log 2>&1
- python initialize.py -net 'mainnet' -rpc '127.0.0.1:10009' -wn && python controller.py runserver 0.0.0.0:8889
# Use host network mode for simplicity, adjust if needed
network_mode: "host"
```

View file

@ -7,6 +7,6 @@ services:
command:
- sh
- -c
- python initialize.py -net 'mainnet' -rpc 'localhost:10009' -wn && python controller.py runserver 0.0.0.0:8000 > /app/data/lndg-controller.log 2>&1
- python initialize.py -net 'mainnet' -rpc 'localhost:10009' -wn && python controller.py runserver 0.0.0.0:8000
ports:
- 8889:8000

View file

@ -235,7 +235,7 @@ def logs(request):
try:
count = request.GET.get('tail', 20)
grep = request.GET.get('grep', None)
logfile = 'data/lndg-controller.log'
logfile = path.join(settings.BASE_DIR, 'data/lndg-controller.log')
file_size = path.getsize(logfile)-2
if file_size == 0:
logs = ['Logs are empty....']

View file

@ -189,7 +189,7 @@ LOGGING = {
'app-file': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'data/lndg-controller.log',
'filename': os.path.join(BASE_DIR, 'data/lndg-controller.log'),
'maxBytes': 25*(1024*1024),
'backupCount': 5,
'formatter': 'verbose',
@ -197,7 +197,7 @@ LOGGING = {
'web-file': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'data/lndg-web.log',
'filename': os.path.join(BASE_DIR, 'data/lndg-web.log'),
'maxBytes': 25*(1024*1024),
'backupCount': 5,
'formatter': 'verbose',

View file

@ -13,9 +13,10 @@ Description=Backend Controller For Lndg
Environment=PYTHONUNBUFFERED=1
User=<run_as_user>
Group=<run_as_user>
WorkingDirectory=/home/<run_as_user>/lndg
ExecStart=/home/<run_as_user>/lndg/.venv/bin/python /home/<run_as_user>/lndg/controller.py
StandardOutput=append:/var/log/lndg-controller.log
StandardError=append:/var/log/lndg-controller.log
StandardOutput=journal
StandardError=journal
Restart=always
RestartSec=60s
[Install]

View file

@ -34,9 +34,10 @@ Description=Run Backend Controller For Lndg
Environment=PYTHONUNBUFFERED=1
User=$INSTALL_USER
Group=$INSTALL_USER
WorkingDirectory=$LNDG_DIR
ExecStart=$LNDG_DIR/.venv/bin/python $LNDG_DIR/controller.py
StandardOutput=append:/var/log/lndg-controller.log
StandardError=append:/var/log/lndg-controller.log
StandardOutput=journal
StandardError=journal
Restart=always
RestartSec=60s
[Install]