builtin

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package builtin is a wrapper of the built-in log package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log is logging client.

func New

func New(level LogLevel, jsonFmt, color bool) *Log

New to create new logging client. Color is not working in json format.

func (*Log) Debug

func (l *Log) Debug(fmt string, args ...interface{})

Debug to do nothing.

func (*Log) Error

func (l *Log) Error(fmt string, args ...interface{})

Error to do nothing.

func (*Log) Fatal

func (l *Log) Fatal(fmt string, args ...interface{})

Fatal to do nothing.

func (*Log) Info

func (l *Log) Info(fmt string, args ...interface{})

Info to do nothing.

func (*Log) Log

func (l *Log) Log(fields map[string]interface{})

Log to do nothing.

func (*Log) Panic

func (l *Log) Panic(fmt string, args ...interface{})

Panic to do nothing.

func (*Log) Trace

func (l *Log) Trace(fmt string, args ...interface{})

Trace to do nothing.

func (*Log) Warn

func (l *Log) Warn(fmt string, args ...interface{})

Warn to do nothing.

type LogLevel

type LogLevel int8

LogLevel is level of log that will be printed. Will print level that is higher than your chosen one.

const (
	TraceLevel LogLevel = iota - 1
	DebugLevel
	InfoLevel
	WarnLevel
	ErrorLevel
	FatalLevel
	PanicLevel
	Disabled
)

Available log level.

Jump to

Keyboard shortcuts

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