Documentation
¶
Overview ¶
Package seelog provides the configuration for the logger
Index ¶
- type Config
- func (c *Config) ConfigureSyslog(syslogURI string)
- func (c *Config) EnableConsoleLog(v bool)
- func (c *Config) EnableFileLogging(f string, maxsize, maxrolls uint)
- func (c *Config) Render() (string, error)
- func (c *Config) SetLogLevel(l string)
- func (c *Config) SlogLogger() (types.LoggerInterface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config abstracts seelog XML configuration definition
func NewSeelogConfig ¶
func NewSeelogConfig(name, level, format, jsonFormat, commonFormat string, syslogRFC bool, jsonFormatter, commonFormatter func(ctx context.Context, r stdslog.Record) string) *Config
NewSeelogConfig returns a SeelogConfig filled with correct parameters
func (*Config) ConfigureSyslog ¶
ConfigureSyslog enables and configures syslog if the syslogURI it not an empty string
func (*Config) EnableConsoleLog ¶
EnableConsoleLog sets enable or disable console logging depending on the parameter value
func (*Config) EnableFileLogging ¶
EnableFileLogging enables and configures file logging if the filename is not empty
func (*Config) SetLogLevel ¶
SetLogLevel configures the loglevel
func (*Config) SlogLogger ¶ added in v0.74.0
func (c *Config) SlogLogger() (types.LoggerInterface, error)
SlogLogger returns a slog logger behaving the same way as Render would configure a seelog logger
Click to show internal directories.
Click to hide internal directories.