mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
build: extract File logging options into own struct
In preparation for extending LoggerConfig with file specific config.
This commit is contained in:
@@ -13,7 +13,7 @@ const (
|
||||
//nolint:lll
|
||||
type LogConfig struct {
|
||||
Console *consoleLoggerCfg `group:"console" namespace:"console" description:"The logger writing to stdout and stderr."`
|
||||
File *LoggerConfig `group:"file" namespace:"file" description:"The logger writing to LND's standard log file."`
|
||||
File *FileLoggerConfig `group:"file" namespace:"file" description:"The logger writing to LND's standard log file."`
|
||||
}
|
||||
|
||||
// LoggerConfig holds options for a particular logger.
|
||||
@@ -29,8 +29,10 @@ type LoggerConfig struct {
|
||||
func DefaultLogConfig() *LogConfig {
|
||||
return &LogConfig{
|
||||
Console: defaultConsoleLoggerCfg(),
|
||||
File: &LoggerConfig{
|
||||
CallSite: callSiteOff,
|
||||
File: &FileLoggerConfig{
|
||||
LoggerConfig: LoggerConfig{
|
||||
CallSite: callSiteOff,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -59,3 +61,8 @@ func (cfg *LoggerConfig) HandlerOptions() []btclog.HandlerOption {
|
||||
|
||||
return opts
|
||||
}
|
||||
|
||||
// FileLoggerConfig extends LoggerConfig with specific log file options.
|
||||
type FileLoggerConfig struct {
|
||||
LoggerConfig
|
||||
}
|
||||
|
Reference in New Issue
Block a user