log

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package types contains log utils for fractal project.

Package types contains log utils for fractal project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crit

func Crit(msg string, ctx ...interface{})

func Debug

func Debug(msg string, ctx ...interface{})

func Error

func Error(msg string, ctx ...interface{})

func Info

func Info(msg string, ctx ...interface{})

func SetDefaultLogger

func SetDefaultLogger(logger Logger)

func Warn

func Warn(msg string, ctx ...interface{})

Types

type Lazy

type Lazy struct {
	Fn interface{}
}

type Log15Logger

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

func (*Log15Logger) Crit

func (logger *Log15Logger) Crit(msg string, ctx ...interface{})

func (*Log15Logger) Debug

func (logger *Log15Logger) Debug(msg string, ctx ...interface{})

func (*Log15Logger) Error

func (logger *Log15Logger) Error(msg string, ctx ...interface{})

func (*Log15Logger) Info

func (logger *Log15Logger) Info(msg string, ctx ...interface{})

func (*Log15Logger) NewSubLogger

func (logger *Log15Logger) NewSubLogger(ctx ...interface{}) Logger

func (*Log15Logger) Warn

func (logger *Log15Logger) Warn(msg string, ctx ...interface{})

type Logger

type Logger interface {
	// Debug Log
	Debug(msg string, ctx ...interface{})

	// Info Log
	Info(msg string, ctx ...interface{})

	// Warn Log
	Warn(msg string, ctx ...interface{})

	// Error Log
	Error(msg string, ctx ...interface{})

	// Crit Log
	Crit(msg string, ctx ...interface{})

	// Sub Logger
	NewSubLogger(ctx ...interface{}) Logger
}

func InitLog15Logger

func InitLog15Logger(level Lvl, writer io.Writer) Logger

func InitMultipleLog15Logger

func InitMultipleLog15Logger(level Lvl, fpWriter io.Writer, consoleFile *os.File) Logger

func NewSubLogger

func NewSubLogger(ctx ...interface{}) Logger

type Lvl

type Lvl int

Lvl is a type for predefined log levels.

const (
	LvlCrit Lvl = iota
	LvlError
	LvlWarn
	LvlInfo
	LvlDebug
)

List of predefined log Levels

Jump to

Keyboard shortcuts

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