access_log

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerInit

func LoggerInit(c LogConfig) (log4go.Logger, error)

LoggerInit initialize logger. Log file name is prefix.log

func LoggerInit2

func LoggerInit2(fileName, logDir, when string, backupCount int) (log4go.Logger, error)

LoggerInit2 initialize logger. Log file name is fileName

func LoggerInit3

func LoggerInit3(filePath, when string, backupCount int) (log4go.Logger, error)

LoggerInit3 initialize logger. FilePath should be provided

func LoggerInitWithFormat

func LoggerInitWithFormat(c LogConfig, format string) (log4go.Logger, error)

LoggerInitWithFormat initialize logger. Format should be provided

func LoggerInitWithFormat2

func LoggerInitWithFormat2(fileName, logDir, when string, backupCount int,
	format string) (log4go.Logger, error)

LoggerInitWithFormat2 is similar to LoggerInit, instead of prefix, fileName should be provided.

func LoggerInitWithSvr

func LoggerInitWithSvr(progName string, loggerName string,
	network string, svrAddr string) (log4go.Logger, error)

LoggerInitWithSvr initialize logger with remote log server.

Types

type LogConfig added in v1.2.0

type LogConfig struct {
	// Log directly to a single file (eg. /dev/stdout)
	LogFile string // log file path

	// Log with rotation under specified directory
	LogPrefix   string // log file prefix
	LogDir      string // log file dir
	RotateWhen  string // rotate time
	BackupCount int    // log file backup number
}

func (*LogConfig) Check added in v1.2.0

func (cfg *LogConfig) Check(confRoot string) error

Jump to

Keyboard shortcuts

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