From c6a1afd3c79c4e0ba3f834bcd0782f242f7e7d1e Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 27 Jul 2020 14:58:51 -0400 Subject: [PATCH] Remove syslog stuff for Windows support + LogToFile()'s a better choice. --- logging.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/logging.go b/logging.go index e4f2385..6455c05 100644 --- a/logging.go +++ b/logging.go @@ -1,10 +1,7 @@ -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - package tea import ( "log" - "log/syslog" "os" ) @@ -28,17 +25,3 @@ func LogToFile(path string, prefix string) (*os.File, error) { log.SetOutput(f) return f, nil } - -// UseSysLog sets up logging to log the system log. This becomes helpful when -// debugging since we can't print to the terminal since our TUI is occupying it. -// -// On macOS this is a just a matter of: tail -f /var/log/system.log -// On Linux this varies depending on distribution. -func UseSysLog(programName string) error { - l, err := syslog.New(syslog.LOG_NOTICE, programName) - if err != nil { - return err - } - log.SetOutput(l) - return nil -}