-
Levente Pap authored
* Fix #355 Terminate GoShimmer without config file - `skip-config` flag to bypass check and supply values from cli * Remove empty line * Add some comments * change termination comment * lower case beginning of comments * Don't mount config file into docker container by default * Integration tests skip config file check * Add flags for logger config * Log at debug level for integration tests * Update hive.go to latest version * upgrade hive.go Signed-off-by:
Wolfgang Welz <welzwo@gmail.com> Co-authored-by:
Luca Moser <moser.luca@gmail.com> Co-authored-by:
jonastheis <mail@jonastheis.de> Co-authored-by:
Wolfgang Welz <welzwo@gmail.com>
Levente Pap authored* Fix #355 Terminate GoShimmer without config file - `skip-config` flag to bypass check and supply values from cli * Remove empty line * Add some comments * change termination comment * lower case beginning of comments * Don't mount config file into docker container by default * Integration tests skip config file check * Add flags for logger config * Log at debug level for integration tests * Update hive.go to latest version * upgrade hive.go Signed-off-by:
Wolfgang Welz <welzwo@gmail.com> Co-authored-by:
Luca Moser <moser.luca@gmail.com> Co-authored-by:
jonastheis <mail@jonastheis.de> Co-authored-by:
Wolfgang Welz <welzwo@gmail.com>
parameters.go 1.13 KiB
package logger
import (
flag "github.com/spf13/pflag"
)
const (
// CfgLoggerLevel defines the logger's level.
CfgLoggerLevel = "logger.level"
// CfgLoggerDisableCaller defines whether to disable caller info.
CfgLoggerDisableCaller = "logger.disableCaller"
// CfgLoggerDisableStacktrace defines whether to disable stack trace info.
CfgLoggerDisableStacktrace = "logger.disableStacktrace"
// CfgLoggerEncoding defines the logger's encoding.
CfgLoggerEncoding = "logger.encoding"
// CfgLoggerOutputPaths defines the logger's output paths.
CfgLoggerOutputPaths = "logger.outputPaths"
// CfgLoggerDisableEvents defines whether to disable logger events.
CfgLoggerDisableEvents = "logger.disableEvents"
)
func initFlags() {
flag.String(CfgLoggerLevel, "info", "log level")
flag.Bool(CfgLoggerDisableCaller, false, "disable caller info in log")
flag.Bool(CfgLoggerDisableStacktrace, false, "disable stack trace in log")
flag.String(CfgLoggerEncoding, "console", "log encoding")
flag.StringSlice(CfgLoggerOutputPaths, []string{"stdout", "goshimmer.log"}, "log output paths")
flag.Bool(CfgLoggerDisableEvents, true, "disable logger events")
}