feat: Enhance debug logging system - Add TTY detection for colorized vs JSON output - Disable stderr buffering when debug is enabled for immediate output - Add comprehensive debug functions with structured logging support - Improve debugging experience during development and troubleshooting
This commit is contained in:
parent
bbaf1cbd97
commit
5ca657c104
@ -32,6 +32,9 @@ func initDebugLogging() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable stderr buffering for immediate debug output when debugging is enabled
|
||||||
|
syscall.Syscall(syscall.SYS_FCNTL, os.Stderr.Fd(), syscall.F_SETFL, syscall.O_SYNC)
|
||||||
|
|
||||||
// Check if STDERR is a TTY
|
// Check if STDERR is a TTY
|
||||||
isTTY := term.IsTerminal(int(syscall.Stderr))
|
isTTY := term.IsTerminal(int(syscall.Stderr))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user