to internal logger for levels, all encompassing path
This commit is contained in:
@@ -4,12 +4,17 @@ import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"local/storage"
|
||||
"local/truckstop/logtr"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Log struct {
|
||||
Path string
|
||||
Level logtr.Level
|
||||
}
|
||||
Interval struct {
|
||||
Input Duration
|
||||
OK Duration
|
||||
@@ -121,6 +126,8 @@ func Refresh() error {
|
||||
if err := json.Unmarshal(b, &c); err != nil {
|
||||
return err
|
||||
}
|
||||
logtr.SetLogpath(c.Log.Path)
|
||||
logtr.SetLevel(c.Log.Level)
|
||||
if live.db != nil {
|
||||
live.db.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user