initial support for file logging

This commit is contained in:
A.Unger
2021-03-17 15:26:43 +01:00
parent 732db59bcf
commit 8a3e280d83
16 changed files with 47 additions and 1 deletions

View File

@@ -66,6 +66,7 @@ func NewLogger(cfg *config.Config) log.Logger {
log.Level(cfg.Log.Level),
log.Pretty(cfg.Log.Pretty),
log.Color(cfg.Log.Color),
log.File(cfg.Log.File),
)
}
@@ -124,6 +125,7 @@ func NewSutureService(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Settings.Supervised = true
}
cfg.Settings.Log.File = cfg.Log.File
return SutureService{
cfg: cfg.Settings,
}

View File

@@ -7,6 +7,7 @@ type Log struct {
Level string
Pretty bool
Color bool
File string
}
// Debug defines the available debug configuration.