# Functions
All returns a new logger with all flags enabled.
BackgroundErrors reads errors from a channel and logs them as errors.
CombineAnnotations combines one or many set of annotations.
CombineLabels combines one or many set of fields.
FatalExit will print the error and exit the process with exit(1).
FlagsAll returns a flags set with all enabled.
FlagsNone returns a flags set with no flags enabled.
FlagTextColor returns the color for a flag.
FormatAnnotations formats the output of annotations as a string.
FormatLabels formats the output of labels as a string.
GetAnnotations gets annotations off a context.
GetEventTimestamp returns the timestamp for an event.
GetLabel gets a label off a context by key.
GetLabels gets labels off a context.
GetLogger gets a logger off a context.
GetPath gets a path off a context.
GetRestricted gets restricted value from a context.
GetTimestamp gets a timestampoff a context.
GetTriggerTimestamp gets when an event was triggered off a context.
IsLoggerSet returns if the logger instance is set.
IsSkipTrigger returns if we should skip triggering logger listeners for a context.
IsSkipWrite returns if we should skip writing to the event stream for a context.
MaybeDebug triggers Debug if the logger is set.
MaybeDebugContext triggers Debug in a given context if the logger is set.
MaybeDebugf triggers Debugf if the logger is set.
MaybeDebugfContext triggers Debugf in a given context if the logger is set.
MaybeDrainContext drains a logger if it's a valid reference and can be drained.
MaybeError triggers Error if the logger is set.
MaybeErrorContext triggers Error in a given context if the logger is set.
MaybeErrorf triggers Errorf if the logger is set.
MaybeErrorfContext triggers Errorf in a given context if the logger is set.
MaybeFatal triggers Fatal if the logger is set.
MaybeFatalContext triggers Fatal in a given context if the logger is set.
MaybeFatalExit triggers Fatal if the logger is set and the error is set, and exit(1)s.
MaybeFatalf triggers Fatalf if the logger is set.
MaybeFatalfContext triggers Fatalf in a given context if the logger is set.
MaybeInfo triggers Info if the logger is set.
MaybeInfoContext triggers Info in a given context if the logger.
MaybeInfof triggers Infof if the logger is set.
MaybeInfofContext triggers Infof in a given context if the logger is set.
MaybeTrigger triggers an event if the logger is set.
MaybeTriggerContext triggers an event if the logger is set in a given context.
MaybeWarning triggers Warning if the logger is set.
MaybeWarningContext triggers Warning in a given context if the logger is set.
MaybeWarningf triggers Warningf if the logger is set.
MaybeWarningfContext triggers Warningf in a given context if the logger is set.
Memory creates a logger that logs to the in-memory writer passed in.
MustNew creates a new logger with a given list of options and panics on error.
New returns a new logger with a given set of enabled flags.
NewAuditEvent returns a new audit event.
NewAuditEventFilter returns a new audit event filter.
NewAuditEventListener returns a new audit event listener.
NewErrorEvent returns a new error event.
NewErrorEventFilter returns a new error event filter.
NewErrorEventListener returns a new error event listener.
NewFlags returns a new flag set from an array of flag values.
NewInterlockedWriter returns a new interlocked writer.
NewJSONOutputFormatter returns a new json event formatter.
NewLinesWriter returns a new line writer.
NewMessageEvent returns a new message event.
NewMessageEventFilter returns a new message event filter.
NewMessageEventListener returns a new message event listener.
NewScope returns a new scope for a logger with a given set of optional options.
NewScopedErrorEventListener returns a new error event listener that listens to specified scopes.
NewScopes yields a scope set from a list of scopes.
NewShimWriter returns a new shim writer.
NewTextOutputFormatter returns a new text writer for a given output.
NewWorker returns a new worker.
None returns a new logger with all flags enabled.
OptAll sets all flags enabled on the logger by default.
OptAllScopes sets all scopes enabled on the logger by default.
OptAllWritable sets all flags enabled on the logger by default.
OptAllWritableScopes sets all scopes for writing enabled on the logger by default.
OptAuditContext sets a field on an AuditEvent.
OptAuditExtra sets a field on an AuditEvent.
OptAuditNoun sets a field on an AuditEvent.
OptAuditPrincipal sets a field on an AuditEvent.
OptAuditProperty sets a field on an AuditEvent.
OptAuditRemoteAddress sets a field on an AuditEvent.
OptAuditSubject sets a field on an AuditEvent.
OptAuditUserAgent sets a field on an AuditEvent.
OptAuditVerb sets a field on an AuditEvent.
OptConfig sets the logger based on a config.
OptConfigFromEnv sets the logger based on a config read from the environment.
OptDisabled sets disabled flags on the logger.
OptDisabledScopes sets disabled scopes on the logger.
OptDisabledWritable sets disabled flags on the logger.
OptDisabledWritableScopes sets disabled flags on the logger.
OptEnabled sets enabled flags on the logger.
OptEnabledScopes sets enabled scopes on the logger.
OptEnabledWritable sets enabled writable flags on the logger.
OptEnabledWritableScopes sets enabled writable scopes on the logger.
OptErrorEventRestricted sets the restricted field on an error event.
OptErrorEventState sets the state on an error event.
OptFlags sets the flags on the logger.
OptFormatter sets the output formatter.
OptJSON sets the output formatter for the logger as json.
OptJSONConfig sets a json formatter from a config.
OptJSONPretty sets the json output formatter to indent output.
OptJSONPrettyIndent sets the json output formatter to indent output.
OptJSONPrettyPrefix sets the json output formatter to indent output.
OptLabels sets an initial logger scope labels.
OptMessageElapsed sets a field on a message event.
OptMessageFlag sets a field on a message event.
OptMessageRestricted sets a field on a message event.
OptMessageText sets a field on a message event.
OptNone sets no flags enabled on the logger by default.
OptNoneScopes sets no scopes enabled on the logger by default.
OptNoneWritable sets no flags enabled for writing on the logger by default.
OptNoneWritableScopes sets no scopes enabled for writing on the logger by default.
OptOutput sets the output writer for the logger.
OptPath sets an initial logger context path.
OptScopeAnnotations sets the annotations on a scope.
OptScopeLabels sets the labels on a scope.
OptScopePath sets the path on a scope.
OptScopeRestriction sets the restricted value on a scope.
OptScopes sets the scopes on the logger.
OptShimWriterContext sets the context for a given shim writer.
OptShimWriterEventProvider sets the event provider for the shim writer.
OptText sets the output formatter for the logger as json.
OptTextConfig sets the text formatter config.
OptTextHideFields hides the fields in output.
OptTextHideTimestamp hides the timestamp in output.
OptTextNoColor disables colorizing text output.
OptTextTimeFormat sets the timestamp format.
OptWritable sets the writable flags on the logger.
OptWritableScopes sets the writable scopes on the logger.
Prod returns a new logger tuned for production use.
ScopesAll returns a preset scopes with the all flag flipped.
ScopesNone returns a preset empty scopes.
ShimWriterErrorEventProvider returns an error event with a given flag for a given contents.
ShimWriterMessageEventProvider returns a message event with a given flag for a given contents.
StdlibShim returns a stdlib logger that writes to a given logger instance.
WithAnnotation returns a new context with a given additional annotation.
WithAnnotations returns a new context with a given additional annotations.
WithLabel returns a new context with a given additional label.
WithLabels returns a new context with a given additional labels.
WithLogger adds the logger to a context.
WithPath returns a new context with a given path segment(s).
WithPathAppend appends a given path segment to a context.
WithRestricted returns a new context with the restricted value.
WithSetLabels sets the labels on a context, overwriting any existing labels.
WithSkipTrigger sets the context to skip logger listener triggers.
WithSkipWrite sets the context to skip writing the event to the output stream.
WithTimestamp returns a new context with a given timestamp value.
WithTriggerTimestamp returns a new context with a given timestamp value.
# Constants
Audit controls events that indiciate security related information.
Debug controls output that is useful when diagnosing issues.
256.
JSON Formatter defaults.
Constants.
DefaultTextTimeFormat is the default time format.
DefaultTextWriterShowHeadings is a default setting for writers.
DefaultTextWriterShowTimestamp is a default setting for writers.
DefaultTextWriterUseColor is a default setting for writers.
DefaultWorkerQueueDepth is the default depth per listener to queue work.
Environment Variable Names.
Environment Variable Names.
Environment Variable Names.
Environment Variable Names.
Environment Variable Names.
Environment Variable Names.
Error controls errors that should be logged by default and may affect user behavior.
Fatal controls errors that should be considered process ending.
Common json fields.
Common json fields.
Common json fields.
Common json fields.
Common json fields.
Common json fields.
Common json fields.
Common json fields.
FlagAll enables all flags by default.
FlagNone disables all flags by default.
Output Formats.
Output Formats.
Info controls output that is useful for output by default.
String constants.
ScopeAll is a special scope that matches all scopes.
String constants.
Warning controls errors that should be skipped by default but may help debugging.
# Variables
Default flags.
Default flags.
DefaultFlagTextColor is the default flag color.
DefaultFlagTextColors is the default color for each known flag.
Default flags.
Default flags.
Default flags.
Default flags.
# Structs
AuditEvent is a common type of event detailing a business action by a subject.
Config is the logger config.
ErrorEvent is an event that wraps an error.
EventContext is a wrapping context for events.
EventWithContext is an event with the context it was triggered with.
Flags is a set of event flags.
InterlockedWriter is a writer that serializes access to the Write() method.
JSONConfig is the config for a json formatter.
JSONOutputFormatter is a json output formatter.
LinesWriter is a writer that writes one line at a time, i.e.
Logger is a handler for various logging events with descendent handlers.
MessageEvent is a common type of message.
NopCloserWriter doesn't allow the underlying writer to be closed.
Scope is a set of re-usable parameters for triggering events.
Scopes is a set of scopes.
ShimWriter is a type that implements io.Writer with a logger backend.
TextConfig is the config for a text formatter.
TextOutputFormatter handles formatting messages as text.
Worker is an agent that processes a listener.
# Interfaces
ApplyContexter is a type that modifies a context.
Closer is a type that can close.
DebugfReceiver is a type that defines Debugf.
DebugReceiver is a type that defines Debug.
Drainer is a type that can be drained.
Errorable is an interface.
ErrorfReceiver is a type that defines Errorf.
ErrorOutputReceiver is an interface.
ErrorReceiver is a type that defines Error.
Event is an interface representing methods necessary to trigger listeners.
FatalCloser is a type that defines Fatal and Close.
FatalfReceiver is a type that defines Fatalf.
FatalReceiver is a type that defines Fatal.
Filterable is an interface loggers can ascribe to.
FilterListenable is a type that loggers can ascribe to.
Flagged is a type that returns flags.
FullLog is a logger that implements the full suite of logging methods.
InfofReceiver is a type that defines Infof.
InfoReceiver is a type that defines Info.
JSONWritable is a type that implements a decompose method.
Listenable is an interface loggers can ascribe to.
Log is a logger that implements the full suite of logging methods.
OutputReceiver is an interface.
PrintfReceiver is a type that defines Printf.
PrintlnReceiver is a type that defines Println.
PrintReceiver is a type that defines Print.
Scoper is a type that can return a scope.
TextFormatter is a type that can format text output.
TextWritable is an event that can be written.
TimestampProvider is a type that provides a timestamp.
Triggerable is type that can trigger events.
WarningfReceiver is a type that defines Warningf.
WarningReceiver is a type that defines Warning.
Writable is a type that can write events.
WriteFormatter is a formatter for writing events to output writers.
WriteTriggerable is a type that can both trigger and write events.
# Type aliases
Annotations are a collection of string name value pairs.
AuditEventOption is an option for AuditEvents.
ErrorEventOption is an option for error events.
Filter mutates an event.
JSONOutputFormatterOption is an option for json formatters.
Labels are a collection of string name value pairs.
Listener is a function that can be triggered by events.
MessageEventOption mutates a message event.
Option is a logger option.
ScopeOption is a mutator for a scope.
ShimWriterOption is a mutator for a shim writer.
TextOutputFormatterOption is an option for text formatters.