seelog

package
v0.77.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package seelog provides the configuration for the logger

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Config abstracts the logger configuration

func NewSeelogConfig

func NewSeelogConfig(name, level, format string, syslogRFC bool, jsonFormatter, commonFormatter func(ctx context.Context, r stdslog.Record) string) *Config

NewSeelogConfig returns a Config filled with correct parameters

func (*Config) ConfigureSyslog

func (c *Config) ConfigureSyslog(syslogURI string)

ConfigureSyslog enables and configures syslog if the syslogURI it not an empty string

func (*Config) EnableConsoleLog

func (c *Config) EnableConsoleLog(v bool)

EnableConsoleLog sets enable or disable console logging depending on the parameter value

func (*Config) EnableFileLogging

func (c *Config) EnableFileLogging(f string, maxsize, maxrolls uint)

EnableFileLogging enables and configures file logging if the filename is not empty

func (*Config) SetLogLevel

func (c *Config) SetLogLevel(l string)

SetLogLevel configures the loglevel

func (*Config) SlogLogger added in v0.74.0

func (c *Config) SlogLogger() (types.LoggerInterface, error)

SlogLogger returns a slog logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL