1
0
Fork 0
forked from External/ergo

log: Allow logging to stdout

This commit is contained in:
Daniel Oaks 2017-05-01 18:51:37 +10:00
parent 51425b7764
commit 7ac96114c3
5 changed files with 20 additions and 6 deletions

View file

@ -136,6 +136,7 @@ type ConnectionThrottleConfig struct {
// LoggingConfig controls a single logging method.
type LoggingConfig struct {
Method string
MethodStdout bool
MethodStderr bool
MethodFile bool
Filename string
@ -443,6 +444,7 @@ func LoadConfig(filename string) (config *Config, err error) {
return nil, errors.New("Logging configuration specifies 'file' method but 'filename' is empty")
}
logConfig.MethodFile = methods["file"]
logConfig.MethodStdout = methods["stdout"]
logConfig.MethodStderr = methods["stderr"]
// levels