feat: comprehensive debug logging across all controller modules
Add detailed [DEBUG] logging to every controller module when logging.level is set to "debug". Each module with stateful debug uses SetDebug(bool) wired from main.go. Covers stacks, backup, cloudflare, integrations, system, monitor, settings, scheduler, web handlers, storage, metrics, API, selfupdate, and assets. Also includes the app export/import (.fab bundles) feature from v0.32.0 and its debug page integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
package system
|
||||
|
||||
import "log"
|
||||
|
||||
// DebugLogger, when non-nil, enables debug-level logging for the system package.
|
||||
// Set this to the application's *log.Logger when config logging.level == "debug".
|
||||
// When nil, no debug output is emitted.
|
||||
var DebugLogger *log.Logger
|
||||
|
||||
// debugf logs a formatted message if DebugLogger is set.
|
||||
func debugf(format string, args ...any) {
|
||||
if DebugLogger != nil {
|
||||
DebugLogger.Printf(format, args...)
|
||||
}
|
||||
}
|
||||
|
||||
// SystemInfo holds system resource usage information.
|
||||
type SystemInfo struct {
|
||||
TotalMemMB uint64 `json:"total_mem_mb"`
|
||||
|
||||
Reference in New Issue
Block a user