summaryrefslogtreecommitdiff
path: root/internal/log/log.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/log/log.go')
-rw-r--r--internal/log/log.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/log/log.go b/internal/log/log.go
index 2fb2444..16cf1fd 100644
--- a/internal/log/log.go
+++ b/internal/log/log.go
@@ -47,6 +47,9 @@ type FileLogger struct {
file *os.File
}
+// Logger is the global logger instance
+var Logger *FileLogger
+
type Level int8
const (
@@ -174,3 +177,7 @@ func (logger *FileLogger) log(lvl Level, msg string, params ...interface{}) {
log.Println(f)
}
}
+
+func init() {
+ Logger = &FileLogger{}
+}