Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultPath is default path for storing logs DefaultPath = "/opt/openGemini/logs/" // DefaultLevel is the level of logs will be emitted DefaultLevel = zap.InfoLevel // DefaultMaxSize is the max size of a log file DefaultMaxSize = 64 * 1024 * 1024 // 64MB // DefaultMaxNum is the max number of log files DefaultMaxNum = 16 // DefaultMaxAge is the max duration a log file can keep DefaultMaxAge = 7 // 7days // DefaultCompressEnabled is whether the log files are compressed DefaultCompressEnabled = true )
Variables ¶
This section is empty.
Functions ¶
func ParsePlugins ¶
Types ¶
type Config ¶
type Config struct {
Logging *Logger `toml:"logging"`
TLS *tlsconfig.Config `toml:"tls"`
Http *Http `toml:"http"`
Inputs []node.Node
Outputs []node.Node
Parsers []node.Node
// contains filtered or unexported fields
}
func (*Config) GetLogConfig ¶
type Http ¶
type Http struct {
BindAddress string `toml:"bind-address"`
PprofEnabled bool `toml:"pprof-enabled"`
}
func NewHttpConfig ¶
func NewHttpConfig() *Http
type Logger ¶
type Logger struct {
Format string `toml:"format"`
Level zapcore.Level `toml:"level"`
MaxSize toml.Size `toml:"max-size"`
MaxNum int `toml:"max-num"`
MaxAge int `toml:"max-age"`
CompressEnabled bool `toml:"compress-enabled"`
Path string `toml:"path"`
// contains filtered or unexported fields
}
func GetStoreLogger ¶
func GetStoreLogger() *Logger
func (*Logger) GetFileName ¶
Click to show internal directories.
Click to hide internal directories.