fix log output
This commit is contained in:
parent
249c2a97b8
commit
e6737ba635
|
@ -1,12 +1,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
func doOutput(s string) {
|
||||
f, err := os.OpenFile("/tmp/gemini-output.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||
filename := "/tmp/gemini-output.log"
|
||||
f, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
|
@ -15,4 +17,6 @@ func doOutput(s string) {
|
|||
if _, err := f.WriteString(s + "\n"); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
|
||||
log.Info("OUTPUT LOGGED TO", filename)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue