Removed everything related to logToStdout.
This commit is contained in:
parent
b50c411922
commit
36ecd3cf10
@ -14,7 +14,6 @@ import (
|
||||
)
|
||||
|
||||
var configPath *string = flag.String("conf", "config.yaml", "path to configuration file")
|
||||
var logToStdout *bool = flag.Bool("log-stdout", false, "write logs to stdout")
|
||||
var showVersion *bool = flag.Bool("v", false, "show version")
|
||||
|
||||
func main() {
|
||||
@ -30,17 +29,13 @@ func main() {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
if *logToStdout {
|
||||
config.Log.ToStdout = true
|
||||
}
|
||||
|
||||
logErr, err := logging.NewLogger(config.Log.CleanError, config.Log.ToStdout)
|
||||
logErr, err := logging.New(config.Log.CleanError)
|
||||
if err != nil {
|
||||
log.Fatalln("failed to open error logger:", err)
|
||||
}
|
||||
defer logErr.Close()
|
||||
|
||||
logClean, err := logging.NewLogger(config.Log.Clean, config.Log.ToStdout)
|
||||
logClean, err := logging.New(config.Log.Clean)
|
||||
if err != nil {
|
||||
log.Fatalln("failed to open error logger:", err)
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ import (
|
||||
)
|
||||
|
||||
var configPath *string = flag.String("conf", "config.yaml", "path to configuration file")
|
||||
var logToStdout *bool = flag.Bool("log-stdout", false, "write logs to stdout")
|
||||
var showVersion *bool = flag.Bool("v", false, "show version")
|
||||
|
||||
var version string
|
||||
@ -40,29 +39,25 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
if *logToStdout {
|
||||
config.Log.ToStdout = true
|
||||
}
|
||||
|
||||
logErr, err := logging.NewLogger(config.Log.Error, config.Log.ToStdout)
|
||||
logErr, err := logging.New(config.Log.Error)
|
||||
if err != nil {
|
||||
log.Fatalln("error logger:", err)
|
||||
}
|
||||
defer logErr.Close()
|
||||
|
||||
logUpload, err := logging.NewLogger(config.Log.Upload, config.Log.ToStdout)
|
||||
logUpload, err := logging.New(config.Log.Upload)
|
||||
if err != nil {
|
||||
log.Fatalln("upload logger:", err)
|
||||
}
|
||||
defer logUpload.Close()
|
||||
|
||||
logDownload, err := logging.NewLogger(config.Log.Download, config.Log.ToStdout)
|
||||
logDownload, err := logging.New(config.Log.Download)
|
||||
if err != nil {
|
||||
log.Fatalln("download logger:", err)
|
||||
}
|
||||
defer logDownload.Close()
|
||||
|
||||
logDelete, err := logging.NewLogger(config.Log.Delete, config.Log.ToStdout)
|
||||
logDelete, err := logging.New(config.Log.Delete)
|
||||
if err != nil {
|
||||
log.Fatalln("delete logger:", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user