package
0.0.0-20240707112111-9cf347bf49e2
Repository: https://github.com/facebookincubator/go-belt.git
Documentation: pkg.go.dev

# Functions

ParseLogLevel parses incoming string into a Level and returns LevelUndefined with an error if an unknown logging level was passed.

# Constants

EndOfLevel just defines a maximum level + 1.
LevelDebug means a message non-essential for the end user, but useful for debugging the application by its developer.
LevelError means an error case (not a critical problem, but yet an error).
LevelFatal means non-recoverable error case.
LevelInfo means an information message, essential enough to notify the end user (who is not a developer of the application), but about something benign and that does not says to any wrong behavior of the application.
LevelNone means to do not log anything.
LevelPanic means a panic case (basically a recoverable, but critical problem).
LevelTrace is for all other messages.
LevelUndefined is an erroneous value of log-level which just corresponds to the zero-value.
LevelWarning means an odd/unexpected/wrong/undesired/etc case.

# Variables

DefaultGetCallerFunc is the default GetCallerPC function.

# Structs

Config is a resulting configuration of a collection of Options.
Entry
Entry a single log entry to be logged/written.
PreHookResult is a result of computations returned by a PreHook.

# Interfaces

Emitter is a log entry sender.
Flusher defines a method to flush all buffers.
Hook is a pre-processor for log entries.
Logger is an abstract generic structured logger.
Option is an abstract option which changes the behavior of a Logger.
PreHook is executed very early in a Logger, allowing to discard or change an Entry before any essential computations are done.

# Type aliases

Emitters is a set of Emitter-s.
EntryProperties is a collection of EntryProperty-es.
EntryProperty defines special implementation-specific behavior related to a specific Entry.
GetCallerPC is a function which returns the Program Counter (PC) of the piece of code which invoked logging the entry.
Hooks is a collection of Hook-s.
Level is a severity of a message/Entry.
OptionGetCallerFunc overrides GetCallerPC (see description of "GetCallerPC").
Options is a collection of Option-s.
PreHooks is a collection of PreHook-s.