log

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultLogFormatter         = logging.MustStringFormatter("%{color}%{time:2006-01-02 15:04} %{shortfunc} ▶ %{level:.4s} %{id:03x}%{color:reset} %{message}")
	LowVerboseLogFormatter      = logging.MustStringFormatter("%{time:2006-01-02 15:04} ▶ %{level:.4s} %{message}")
	VerboseLogFilePathFormatter = logging.MustStringFormatter("%{color}%{time:2006-01-02 15:04} %{longpkg} %{longfunc} ▶ %{level:.4s} %{id:03x}%{color:reset} %{longfile} %{message}")
)

Define the standard formatter

Functions

func GetLogger

func GetLogger() *logging.Logger

GetLogger - Returns logger

func Init

func Init(appName string)

Init - Initializes the logger

func NewLogBackend

func NewLogBackend(out io.Writer, prefix string, flag int, level logging.Level, format logging.Formatter)

NewLogBackend - Creates new backend logging, it's necessary to call Init, to start the logging created

Types

This section is empty.

Jump to

Keyboard shortcuts

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