Moved logging to a temp file
This commit is contained in:
parent
f6e38bbdeb
commit
33e10299cf
|
@ -7,7 +7,14 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func EnableLogging() (closeFn func()) {
|
func EnableLogging() (closeFn func()) {
|
||||||
f, err := tea.LogToFile("debug.log", "debug")
|
tempFile, err := os.CreateTemp("", "debug.log")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("fatal:", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
tempFile.Close()
|
||||||
|
|
||||||
|
f, err := tea.LogToFile(tempFile.Name(), "debug")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("fatal:", err)
|
fmt.Println("fatal:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
Loading…
Reference in a new issue