logger

package
v0.0.0-...-7737fca Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(DebugToFile, Debug bool)

New initializes the singleton logger

Types

type GocuiHook

type GocuiHook struct {
	// contains filtered or unexported fields
}

GocuiHook is the gocui logrus hook

func NewGocuiHook

func NewGocuiHook(g *gocui.Gui) *GocuiHook

NewGocuiHook returns a logrus hook that writes to the app's debug

func (*GocuiHook) Fire

func (hook *GocuiHook) Fire(entry *logrus.Entry) error

Fire event

func (*GocuiHook) Levels

func (hook *GocuiHook) Levels() []logrus.Level

type Log

type Log struct {
	*logrus.Logger
}

Log wraps the logrus Logger

func Get

func Get() *Log

Get returns the singleton instance of the logger

type LogrusFileHook

type LogrusFileHook struct {
	// contains filtered or unexported fields
}

LogrusFileHook is a file hook for logrus

func NewLogrusFileHook

func NewLogrusFileHook(file string, flag int, chmod os.FileMode) (*LogrusFileHook, error)

NewLogrusFileHook returns a new logrus file hook

func (*LogrusFileHook) Fire

func (hook *LogrusFileHook) Fire(entry *logrus.Entry) error

Fire will execute when logrus is used

func (*LogrusFileHook) Levels

func (hook *LogrusFileHook) Levels() []logrus.Level

Levels are the levels that the logrus file hook supports

Jump to

Keyboard shortcuts

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