# Functions
Add adds the given logger to the list of outputs, it should not be called from other goroutines.
Debug sends the key/value map at level Debug to all registered (log)gers.
Error sends the key/value map at level Error to all registered loggers.
Fatal sends the key/value map at level Fatal to all registered loggers, no other action is taken.
GetRequestID retreives the request id from a request.
Info sends the key/value map at level Info to all registered loggers.
Log sends the key/value map to all registered loggers.
Middleware adds a logging wrapper and request tracing to requests.
New creates a new Logger which writes to a file and to stderr.
NewFile creates a new file logger for the given path at Level Info.
NewStdErr returns a new StructuredLogger of type Default which writes to stderr.
SetRequestID saves the request id in the request context.
Time sends the key/value map to all registered loggers with an additional duration, start and end params set.
Trace retreives the request id from a request as a string.
# Constants
DurationKey is used by the Time function.
ErrorKey is used for errors.
FileFlags serts the flags for OpenFile on the log file.
FilePermissions serts the perms for OpenFile on the log file.
IPKey is used for IP addresses (for colouring).
Valid levels for logging.
Valid levels for logging.
Valid levels for logging.
Valid levels for logging.
LevelKey is the key for setting level.
Valid levels for logging.
MessageKey is the key for a message.
PrefixDate constant for date prefixes.
PrefixDateTime constants for date + time prefix.
PrefixTime constants for time prefix.
Separator is used to separate key:value pairs.
TraceKey is used for trace ids emitted in middleware.
URLKey is used for identifying URLs (for filtering).
# Variables
ClearColors clears all formatting.
LevelColors is a list of human-friendly terminal colors for levels.
LevelNames is a list of human-readable for levels.
NoColor determines if a terminal is colourable or not.
TraceColor sets a for IP addresses or request id.
# Structs
Default defines a default logger which simply logs to Writer, Writer is set to stderr, Level is LevelDebug and Prefix is empty by default.
File logs to a local file for all messages at or above Level.
Logger conforms with the server.Logger interface.
RequestID is but a simple token for tracing requests.
# Interfaces
StructuredLogger defines an interface for loggers which may be added with Add() to the list of outputs.