log

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package log is used to initialize the logger, and supplies some assistant functions about log.

Index

Constants

This section is empty.

Variables

View Source
var LogOpts = []gconf.Opt{
	gconf.StrOpt("log.file", "The file path of the log. The default is stdout.").As("logfile"),
	gconf.StrOpt("log.level", "The level of the log, such as debug, info").D("info").As("loglevel"),
}

LogOpts collects the options about the log.

Functions

func InitLogging

func InitLogging(level, filepath string)

InitLogging is equal to InitLogging2(level, filepath, "100M", 100).

func InitLogging2

func InitLogging2(level, filepath, filesize string, filenum int)

InitLogging2 initializes the logging.

If filepath is empty, it will use Stdout as the writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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