Categorygithub.com/portcullis/logging
modulepackage
0.1.1
Repository: https://github.com/portcullis/logging.git
Documentation: pkg.go.dev

# README

Logging Package

GoDoc Go Report Card Test

This package provides a simple logging implementation.

Stability

1.0.0 will be contain a stable API.

# Packages

No description provided by the author

# Functions

Debug log message.
Error log message.
Fatal log message, and exit -1.
FromContext will return the logger for the specified context or the default one.
Info log message.
New creates a new Log instance with the specified options.
NewContext creates a child context of the supplied context embedding the *Log.
Panic log message - calls panic.
Warning log message.
WithFields options will append the specified fields to the Log.
WithWriter option will set the underlying write for the logs.

# Constants

LevelAlert - A condition that should be corrected immediately, such as a corrupted system database.
LevelCritical - Hard application/device/hardware failures.
LevelDebug - Messages that contain information normally of use only when debugging a program.
LevelEmergency - A panic condition.
LevelError - non-recoverable application errors.
LevelInformational - Messages that contain information about the application operation.
LevelNone - Not inteded to have output.
LevelNotice - Conditions that are not error conditions, but may require special handling.
LevelTrace - Messages that are likely only using while developing applications This is not part of the syslog spec, and might not be supported by all logging.Writer implementations.
LevelWarning - recoverable application errors.

# Variables

DefaultLog is the *Log used in static functions and is returned from contexts when no *Log is present.
Discard will drop the log entries into the abyss (or do nothing).

# Structs

Entry
Entry represents a single log.
Field for structured logging.
Log for ..

# Interfaces

Writer interface for putting log Entry somewhere, someway.

# Type aliases

Level for logging Levels are defaulted to that of syslog severity level https://en.wikipedia.org/wiki/Syslog Interpretation of the Levels is up to the appliation that is using them, the comments provided are only recommendations.
Option for logging.
WriterFunc implements the logging.Writer interface to cast functions to the Writer.