entry

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Time      time.Time
	Level     Level
	Program   string
	Component string
	Message   string
}

Entry defines a general log.Entry

func Make

func Make(level Level, s string, args ...interface{}) Entry

Make creates a new log entry with the passed parameters

type Level

type Level string

Level defines the level of a log.Entry

const (
	// LevelDebug denotes typical debug log entries
	LevelDebug Level = "DEBUG"
	// LevelInfo denotes just informational log entries
	LevelInfo Level = "INFO "
	// LevelWarn denotes warnings, which are not as critical as errors.
	LevelWarn Level = "WARN "
	// LevelError denotes errors on which the system keeps on running but action should be taken.
	LevelError Level = "ERROR"
	// LevelFatal denotes fatal errors in which the system should panic immediately
	LevelFatal Level = "FATAL"
	// LevelAccess denotes http-access messages
	LevelAccess Level = "ACCSS"
	// LevelImportant denotes important messages, which may be handled separately from usual INFO messages
	LevelImportant Level = "IMPNT"
)

Jump to

Keyboard shortcuts

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