feat: enhance logging in service commands with consistent logger usage

- Add entry/exit logging to all ServiceCommand methods (start, stop, status, reload, restart, uninstall)
- Replace mainLog.Load() calls with consistent logger variable usage throughout
- Capitalize all logging messages for better readability
- Add error context logging for service manager initialization failures
- Add debug logging for key operations (restart sequence, cleanup, validation)
- Improve error handling with proper error context in all service commands
- Add completion logging to track command execution flow

This improves debugging capabilities and provides better operational visibility
for service management operations while maintaining clean user-facing messages.
This commit is contained in:
Cuong Manh Le
2025-09-03 18:43:23 +07:00
committed by Cuong Manh Le
parent c8477fe442
commit 64393b7b6c
7 changed files with 129 additions and 52 deletions
+1
View File
@@ -253,6 +253,7 @@ func (p *prog) runWait() {
select {
case p.reloadDoneCh <- struct{}{}:
p.Debug().Msg("reload done signal sent")
default:
}
}