logger

package
v0.0.0-...-3cf5444 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogLevel_Debug = "debug"
	LogLevel_Info  = "info"
	LogLevel_Warn  = "warn"
	LogLevel_Error = "error"
)

Variables

View Source
var (
	DefaultLogPath string
	EnabledLog     bool = false
	EnabledConsole bool = false
)

Functions

func InitLog

func InitLog()

func NewXLog

func NewXLog() *xLog

create new xLog

func SetEnabledConsole

func SetEnabledConsole(enabled bool)

SetEnabledConsole set enabled Console output

func SetEnabledLog

func SetEnabledLog(isLog bool)

SetEnabledLog set enabled log

func SetLogPath

func SetLogPath(path string)

func SetLogger

func SetLogger(logger AppLog)

SetLogPath set log path

Types

type AppLog

type AppLog interface {
	SetLogPath(logPath string)
	SetEnabledConsole(enabled bool)
	SetEnabledLog(enabledLog bool)
	Debug(log string, logTarget string)
	Print(log string, logTarget string)
	Info(log string, logTarget string)
	Warn(log string, logTarget string)
	Error(log string, logTarget string)
}

func Logger

func Logger() AppLog

Jump to

Keyboard shortcuts

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