logging

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultLogDir

func GetDefaultLogDir() string

GetDefaultLogDir returns default log directory

Types

type LogOpts

type LogOpts struct {
	Debug     bool   `json:"debug,omitempty"`
	DebugSQL  bool   `json:"debugSQL,omitempty"`
	LogToFile bool   `json:"logToFile,omitempty"`
	LogDir    string `json:"logDir,omitempty"`
	LogJSON   bool   `json:"logJSON"`
	Quiet     bool   `json:"quiet,omitempty"`
}

LogOpts has options for logging

type Logger

type Logger struct {
	logrus.Entry
}

Logger has logrus entry

var Log Logger

Log for localhost

func NewCustomLogger

func NewCustomLogger(debug, quiet, logToFile bool, logDir, logMsgAnsiColor, serverName string) Logger

NewCustomLogger creates logrus

func NewIODiscardLogger added in v0.21.1

func NewIODiscardLogger() Logger

NewIODiscardLogger creates discard logger

func NewNormalLogger

func NewNormalLogger() Logger

NewNormalLogger creates normal logger

Jump to

Keyboard shortcuts

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