diff options
| author | Jeff Carr <[email protected]> | 2025-10-28 14:54:50 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-28 14:54:50 -0500 |
| commit | 69a8ae0bdc33e898bee5046bfee73692879f5297 (patch) | |
| tree | 63ad1caa8ac41d80394e6357dceb69715a6303b9 /argv.Print.go | |
| parent | 90489b78a80a1ee2204872c6ff434c476f4970cd (diff) | |
more work on organizing this
Diffstat (limited to 'argv.Print.go')
| -rw-r--r-- | argv.Print.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/argv.Print.go b/argv.Print.go index db4d590..f57cbd5 100644 --- a/argv.Print.go +++ b/argv.Print.go @@ -67,15 +67,20 @@ func PrintStddbg() { if !me.debug { return } + f, err := os.OpenFile("/tmp/argv.debug", os.O_APPEND|os.O_RDWR|os.O_CREATE, 0644) + if err != nil { + panic("WTF openfile") + } + defer f.Close() lines := strings.Split(strings.TrimSpace(PB.Stddbg), "\n") if len(lines) == 0 { return } - fmt.Fprintf(os.Stderr, "\n") + fmt.Fprintf(f, "\n") for _, line := range lines { - fmt.Fprintf(os.Stderr, "%s\n", line) + fmt.Fprintf(f, "%s\n", line) } - fmt.Fprintf(os.Stderr, "\n") + fmt.Fprintf(f, "\n") } func PrintStderr() { |
