Back to

Package gollog

Latest Go to latest

The latest major version is .

Published: Jan 10, 2020 | License: MIT | Module:



var (
	GinLogger     = logrus.New()
	GinTimeFormat = time.RFC3339
	GinEnableUTC  = false
var (
	LogLevel = golenv.OverrideIfEnv("GOLLOG_LOG_LEVEL", "5")

func CloseLogFile

func CloseLogFile(log *os.File)

close LogFile

func Debug

func Debug(msg string)

func Debugf

func Debugf(msg string, param ...interface{})

func Err

func Err(msg string)

func Errf

func Errf(msg string, param ...interface{})

func GinLogrus

func GinLogrus() gin.HandlerFunc

func Info

func Info(msg string)

func Infof

func Infof(msg string, param ...interface{})

func LogIt

func LogIt(fyl *os.File, lyn string)

just write to given file handle

func LogOnce

func LogOnce(logfile string, msg string)

Open, Log, Close

func OpenLogFile

func OpenLogFile(logFile string) *os.File

Logfile sends back handle of opened logfile, remember to defer F.Close() at usage.

func Panic

func Panic(msg string)

func Panicf

func Panicf(msg string, param ...interface{})

func Warn

func Warn(msg string)

func Warnf

func Warnf(msg string, param ...interface{})

type Log

type Log struct {
	Level  string
	Thread chan string

Log to declare different streams to manage log

logInfo := gollog.Log{Level: "info", Thread: make(chan string)} go logInfo.LogIt()

logInfo.Thread <- fmt.Sprintf("Message Received: %s", string(msg))

func (Log) Start

func (l Log) Start()

start Log Action

type Logrus

type Logrus struct {
	LogLevel int

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier