refactor: simplify readLog to use standard Supervisor XML-RPC API
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m11s
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m11s
Removed SUPERVISOR_LOGFILE environment variable and simplified readLog() to use the standard 2-parameter XML-RPC API that relies on supervisord's configured logfile path. Changes: - Removed SUPERVISOR_LOGFILE from .env.example - Simplified SupervisorClient.readLog() to accept only offset and length - Removed logfile path parameter and all environment variable logic - Fixed mobile nav container padding (removed px-4 py-6) The readLog() method now uses the standard supervisor.readLog(offset, length) XML-RPC call, which automatically reads from the logfile path configured in supervisord.conf. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -11,10 +11,6 @@ SUPERVISOR_PORT=9001
|
||||
# SUPERVISOR_USERNAME=user
|
||||
# SUPERVISOR_PASSWORD=pass
|
||||
|
||||
# Optional: Path to supervisord main logfile (for reading via XML-RPC)
|
||||
# Default: /var/log/supervisor/supervisord.log
|
||||
# SUPERVISOR_LOGFILE=/var/log/supervisor/supervisord.log
|
||||
|
||||
# Logging Configuration
|
||||
# Log level: debug, info, warn, error (default: info in prod, debug in dev)
|
||||
LOG_LEVEL=info
|
||||
|
||||
@@ -117,7 +117,7 @@ export function Navbar() {
|
||||
{/* Mobile Menu Drawer */}
|
||||
{mobileMenuOpen && (
|
||||
<div className="md:hidden fixed inset-0 top-16 z-50">
|
||||
<div className="container px-4 py-6">
|
||||
<div className="container">
|
||||
<nav className="flex flex-col gap-2 bg-background/95 backdrop-blur-md rounded-lg p-4">
|
||||
{navItems.map((item) => (
|
||||
<Link key={item.href} href={item.href}>
|
||||
|
||||
@@ -252,11 +252,8 @@ export class SupervisorClient {
|
||||
return this.call<ProcessActionResult[]>('supervisor.clearAllProcessLogs');
|
||||
}
|
||||
|
||||
async readLog(offset: number, length: number, logfilePath?: string): Promise<string> {
|
||||
// Use provided path, or fall back to env variable, or use default
|
||||
const path = logfilePath || process.env.SUPERVISOR_LOGFILE || '/var/log/supervisor/supervisord.log';
|
||||
this.logger.debug({ path, offset, length }, 'Reading supervisor main log');
|
||||
return this.call<string>('supervisor.readLog', [offset, length, path]);
|
||||
async readLog(offset: number, length: number): Promise<string> {
|
||||
return this.call<string>('supervisor.readLog', [offset, length]);
|
||||
}
|
||||
|
||||
async clearLog(): Promise<boolean> {
|
||||
|
||||
Reference in New Issue
Block a user