add logging to a tmp file

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-06-26 11:39:47 -04:00 committed by Jakub
parent 7e3aa2a85b
commit d03bc79725
1 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/jroimartin/gocui"
"log"
"os"
)
type rcpResp map[string]interface{}
@ -15,6 +16,12 @@ const interval = 5
var threadDone = make(chan struct{})
func main() {
clientLogFile, err := os.OpenFile("/tmp/x.log", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
if err != nil {
log.Panicln(err)
}
log.SetOutput(clientLogFile)
g, err := gocui.NewGui(gocui.OutputNormal)
if err != nil {
log.Panicln(err)