log

package module
v0.0.0-...-3ddd883 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 3 Imported by: 4

README

log GoDoc Build Status Go Report Card

Logger for Golang with my personal preferences.

Documentation

Index

Constants

View Source
const (
	// DefaultContext it's used as default, prints only warning, errors
	// and alerts.
	DefaultContext = Context(iota)
	// VerboseContext prints more information, logged after some stages
	// in program are being executed.
	VerboseContext = Context(iota)
	// DebuggingContext prints information containing variables values,
	// for debugging purposes.
	DebuggingContext = Context(iota)
)

Variables

This section is empty.

Functions

func Fatal

func Fatal(formatter string, args ...interface{})

Fatal prints and then os.Exit(1).

func Logger

func Logger() (l *log.Logger)

Logger return the modified logger used package.

func Panic

func Panic(formatter string, args ...interface{})

Panic prints and then call panic. noinspection GoUnusedExportedFunction

func Print

func Print(formatter string, args ...interface{})

Print uses formatting and arguments to print text to logger output.

func SetLogContext

func SetLogContext(lc Context)

SetLogContext choose between different contexts and setups log to limit information depending on context.

Types

type Context

type Context byte

Context it's an enum type to choose log contexts for project.

Jump to

Keyboard shortcuts

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