log

package
v0.0.0-...-6216d25 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 5 Imported by: 4

Documentation

Overview

Package log offers various logging options

Index

Constants

View Source
const AppName string = "goBlue/log"

AppName is the name of the application

FullVersion contains the full name and version of this package in a printable string

View Source
const LevelDebug int = 5

LevelDebug debug information

View Source
const LevelError int = 3

LevelError any error occurred

View Source
const LevelFatal int = 2

LevelFatal fatal error, program can at least exit gracefully

View Source
const LevelInfo int = 4

LevelInfo just some information

View Source
const LevelPanic int = 1

LevelPanic program cannot continue. Will actually cause a panic!

View Source
const LogfileBehaviourAll int = 0

LogfileBehaviourAll Defines if the logger logs everything to one single file

View Source
const LogfileBehaviourDaily int = 1

LogfileBehaviourDaily Defines if the logger logs everything to one file for each day (useful for logrotate)

View Source
const VersionBuild string = "s"

VersionBuild is the type of this release. s(table), b(eta), d(evelopment), n(ightly)

View Source
const VersionMajor string = "0"

VersionMajor 0 means in development, >1 ensures compatibility with each minor version, but breakes with new major version

View Source
const VersionMinor string = "1"

VersionMinor introduces changes that require a new version number. If the major version is 0, they are likely to break compatibility

Variables

View Source
var CurrentLevel = 4

CurrentLevel defines the current loglevel

View Source
var CurrentLogFileBehaviour = LogfileBehaviourAll

CurrentLogFileBehaviour defines current logfile behaviour, defaults to LogfileBehaviourAll

View Source
var Logfilename = "log.log"

Logfilename name of the default log

View Source
var Path = "."

Path for the default log

View Source
var PrintToFile = true

PrintToFile defines which outputs are used, note that panic, fatal and error always prints to error.log, if printToFile is true those are printed to normal log file additionally

View Source
var PrintToStderr = true

PrintToStderr defines which outputs are used, note that panic always prints to stderr and ignores this setting, while Info and Debug will never print to stderr

View Source
var PrintToStdout = false

PrintToStdout defines which outputs are used, note that everything will be printed to stdout while nothing is printed by default

Functions

func D

func D(a ...interface{})

D logs debug

func E

func E(a ...interface{})

E logs error

func F

func F(a ...interface{})

F logs fatal

func I

func I(a ...interface{})

I logs info

func P

func P(a ...interface{})

P logs panic, NOTE that this will throw a panic at the end!

Types

This section is empty.

Jump to

Keyboard shortcuts

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