seelog

package
v0.60.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 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 seelog XML configuration definition

func NewSeelogConfig

func NewSeelogConfig(name, level, format, jsonFormat, commonFormat string, syslogRFC bool) *Config

NewSeelogConfig returns a SeelogConfig filled with correct parameters

func (*Config) ConfigureSyslog

func (c *Config) ConfigureSyslog(syslogURI string, usetTLS bool)

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) Render

func (c *Config) Render() (string, error)

Render generates a string containing a valid seelog XML configuration

func (*Config) SetLogLevel

func (c *Config) SetLogLevel(l string)

SetLogLevel configures the loglevel

Jump to

Keyboard shortcuts

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