logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdapterSyslog = "syslog"
)

adapter name

Variables

This section is empty.

Functions

func Debug

func Debug(f interface{}, v ...interface{})

Debug logs a message at debug level

func EnalbeConsoleFor

func EnalbeConsoleFor(tag string, enabled ...bool)

EnalbeConsoleFor enable log to console

func EnalbeFuncCallFor

func EnalbeFuncCallFor(tag string, enabled ...bool)

EnalbeFuncCallFor enable log call func

func Error

func Error(f interface{}, v ...interface{})

Error logs a message at error level

func ErrorFor

func ErrorFor(tag string, f interface{}, v ...interface{})

ErrorFor logs a message at error level

func Fatal

func Fatal(f interface{}, v ...interface{})

Fatal logs a message at critical level

func Info

func Info(f interface{}, v ...interface{})

Info logs a message at info level

func InfoFor

func InfoFor(tag string, f interface{}, v ...interface{})

InfoFor logs a message at info level

func NewLogFile

func NewLogFile(logFileName string, maxDays int, tags ...string) (newLog *logs.BeeLogger)

NewLogFile init another log file

func NewSyslog

func NewSyslog() logs.Logger

NewSyslog create new syslogWriter returning as LoggerInterface.

func SetLevel

func SetLevel(level string)

SetLevel config log level

func Setup

func Setup(console bool, level string, logFileName string, jsonConfig ...string)

Setup init log settings, level fatal,error,warn,info,debug

func Warning

func Warning(f interface{}, v ...interface{})

Warning logs a message at warning level

func WarningFor

func WarningFor(tag string, f interface{}, v ...interface{})

WarningFor logs a message at warning level

Types

type Logger

type Logger interface {
	Warning(format string, v ...interface{})
	Info(format string, v ...interface{})
	Debug(format string, v ...interface{})
}

Logger logger interface use by this lib

func GetLogger

func GetLogger() Logger

GetLogger get logger interface

Jump to

Keyboard shortcuts

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