feat: add centralized error logging system

- Implemented Error Log API to capture and store error logs from various services.
- Updated admin_ui to include Error Log Viewer component for inspecting logs.
- Enhanced error handling in auth_api, employee_api, and transit_api to report errors to the Error Log API.
- Modified existing services to utilize the new error logging functionality.
- Updated Docker Compose configuration to include the Error Log API service.
- Added error logging service in bus_terminal for Flutter application.
This commit is contained in:
Sven laptop
2026-05-17 23:58:23 +02:00
parent 73de0d713e
commit 0e19aa0521
31 changed files with 688 additions and 34 deletions
+28 -2
View File
@@ -1,6 +1,21 @@
version: '3.9'
services:
error_log_api:
build:
context: ./error_log_api
container_name: error_log_api
ports:
- "5003:5003"
environment:
PORT: 5003
PG_HOST: ${POSTGRES_HOST}
PG_PORT: ${POSTGRES_PORT}
PG_DB: ${POSTGRES_DB}
PG_USER: ${POSTGRES_USER_LOGGER}
PG_PASS: ${POSTGRES_PASSWORD_LOGGER}
ERROR_LOG_API_URL: ${ERROR_LOG_API_URL}
restart: unless-stopped
auth_api:
image: ghcr.io/sven491/xtransit/auth_api:latest
container_name: auth_api
@@ -14,7 +29,11 @@ services:
PG_DB: ${POSTGRES_DB}
PG_USER: ${POSTGRES_USER_AUTH}
PG_PASS: ${POSTGRES_PASSWORD_AUTH}
ADMIN_USER_CODES: ${ADMIN_USER_CODES}
DEV_BYPASS: ${DEV_BYPASS:-0}
ERROR_LOG_API_URL: ${ERROR_LOG_API_URL}
depends_on:
- error_log_api
restart: unless-stopped
employee_api:
@@ -29,6 +48,9 @@ services:
PG_DB: ${POSTGRES_DB}
PG_USER: ${POSTGRES_USER_EMPLOYEE}
PG_PASS: ${POSTGRES_PASSWORD_EMPLOYEE}
ERROR_LOG_API_URL: ${ERROR_LOG_API_URL}
depends_on:
- error_log_api
restart: unless-stopped
transit_api:
@@ -44,8 +66,10 @@ services:
PG_DB: ${POSTGRES_DB}
PG_USER: ${POSTGRES_USER_TRANSIT}
PG_PASS: ${POSTGRES_PASSWORD_TRANSIT}
ADMIN_USER_CODES: ${ADMIN_USER_CODES}
DEV_MOCK: ${DEV_MOCK:-0}
ERROR_LOG_API_URL: ${ERROR_LOG_API_URL}
depends_on:
- error_log_api
restart: unless-stopped
admin_ui:
@@ -56,7 +80,9 @@ services:
environment:
AUTH_API: ${AUTH_API}
TRANSIT_API: ${TRANSIT_API}
ERROR_LOG_API: ${ERROR_LOG_API}
depends_on:
- auth_api
- transit_api
- error_log_api
restart: unless-stopped