# Functions
Close closes all the loggers.
ColorAttributeFromString will return a ColorAttribute given a string.
ColorBytes converts a list of ColorAttributes to a byte array.
ColoredMethod addes colors for HtTP methos on log.
ColoredStatus addes colors for HTTP status.
ColoredTime addes colors for time on log.
ColorFprintf will write to the provided writer similar to ColorSprintf.
ColorSprintf returns a colored string from a format and arguments arguments will be wrapped in ColoredValues to protect against color spoofing.
ColorString converts a list of ColorAttributes to a color string.
Critical records critical log.
CriticalWithSkip records critical log from "skip" calls back from this function.
Debug records debug log.
DelLogger removes the named sublogger from the default logger.
DelNamedLogger closes and deletes the named logger.
Error records error log.
ErrorWithSkip records error log from "skip" calls back from this function.
Fatal records fatal log and exit process.
FatalWithSkip records fatal log from "skip" calls back from this function.
FlagsFromString takes a comma separated list of flags and returns the flags for this string.
FromString takes a level string and returns a Level.
GetLevel returns the minimum logger level.
GetLogger returns either a named logger or the default logger.
GetStacktraceLevel returns the minimum logger level.
Info records info log.
IsCritical returns true if at least one logger is CRITICAL.
IsDebug returns true if at least one logger is DEBUG.
IsErrDuplicateName checks if an error is a ErrDuplicateName.
IsError returns true if at least one logger is ERROR.
IsErrTimeout checks if an error is a ErrTimeout.
IsErrUnknownProvider checks if an error is a ErrUnknownProvider.
IsFatal returns true if at least one logger is FATAL.
IsInfo returns true if at least one logger is INFO.
IsTrace returns true if at least one logger is TRACE.
IsWarn returns true if at least one logger is WARN.
Levels returns all the possible logging levels.
Log a message with defined skip and at logging level A skip of 0 refers to the caller of this command.
NewChannelledLog a new logger instance with given logger provider and config.
NewColoredIDValue is a helper function to create a ColoredValue from a Value The Value will be colored with FgCyan If a ColoredValue is provided it is not changed.
NewColoredValue is a helper function to create a ColoredValue from a Value If no color is provided it defaults to Bold with standard Reset If a ColoredValue is provided it is not changed.
NewColoredValueBytes creates a value from the provided value with color bytes If a ColoredValue is provided it is not changed.
NewColoredValuePointer is a helper function to create a ColoredValue from a Value Pointer If no color is provided it defaults to Bold with standard Reset If a ColoredValue is provided it is not changed.
NewConn creates new ConnLogger returning as LoggerProvider.
NewConsoleLogger create ConsoleLogger returning as LoggerProvider.
NewFileLogger create a FileLogger returning as LoggerProvider.
NewLogger create a logger for the default logger.
NewLoggerAsWriter creates a Writer representation of the logger with setable log level.
NewMultiChannelledLog a new logger instance with given logger provider and config.
NewNamedLogger creates a new named logger for a given configuration.
NewSMTPLogger creates smtp writer.
Register registers given logger provider to providers.
Stack will skip back the provided number of frames and return a stack trace with source code.
Trace records trace log.
Warn records warning log.
# Constants
Background text colors.
Background text colors.
Background text colors.
Background text colors.
Background Hi-Intensity text colors.
Background Hi-Intensity text colors.
Background Hi-Intensity text colors.
Background Hi-Intensity text colors.
Background Hi-Intensity text colors.
Background Hi-Intensity text colors.
Background Hi-Intensity text colors.
Background Hi-Intensity text colors.
Background text colors.
Background text colors.
Background text colors.
Background text colors.
Base ColorAttributes.
Base ColorAttributes.
Base ColorAttributes.
Base ColorAttributes.
CRITICAL is for critical errors.
Base ColorAttributes.
DEBUG is for debug logging.
ERROR is for error reporting.
Base ColorAttributes.
FATAL is for fatal errors.
Foreground text colors.
Foreground text colors.
Foreground text colors.
Foreground text colors.
Foreground Hi-Intensity text colors.
Foreground Hi-Intensity text colors.
Foreground Hi-Intensity text colors.
Foreground Hi-Intensity text colors.
Foreground Hi-Intensity text colors.
Foreground Hi-Intensity text colors.
Foreground Hi-Intensity text colors.
Foreground Hi-Intensity text colors.
Foreground text colors.
Foreground text colors.
Foreground text colors.
Foreground text colors.
INFO is for information.
Base ColorAttributes.
the date in the local time zone: 2009/01/23.
function name of the caller: runtime.Caller().
Provided level in brackets [INFO].
Initial character of the provided level in brackets eg.
full file name and line number: /a/logger/c/d.go:23.
Last 20 characters of the filename.
microsecond resolution: 01:23:23.123123.
final file name element and line number: d.go:23.
last part of the function name.
LstdFlags is the initial value for the standard logger.
the time in the local time zone: 01:23:23.
if Ldate or Ltime is set, use UTC rather than the local time zone.
NONE is for no logging.
Base ColorAttributes.
Base ColorAttributes.
TRACE represents the lowest log level.
Base ColorAttributes.
WARN is for warning information.
# Variables
CanColorStderr reports if we can color the Stderr.
CanColorStdout reports if we can color the Stdout Although we could do terminal sniffing and the like - in reality most tools on *nix are happy to display ansi colors.
DEFAULT is the name of the default logger.
NamedLoggers map of named loggers.
# Structs
ChannelledLog represents a cached channel to a LoggerProvider.
ColoredValue will Color the provided value.
ConnLogger implements LoggerProvider.
ConsoleLogger implements LoggerProvider and writes messages to terminal.
ErrDuplicateName represents a Duplicate Name error.
ErrTimeout represents a "Timeout" kind of error.
ErrUnknownProvider represents a "Unknown Provider" kind of error.
Event represents a logging event.
FileLogger implements LoggerProvider.
Logger is default logger in the Gitea application.
LoggerAsWriter is a io.Writer shim around the gitea log.
MultiChannelledLog represents a cached channel to a LoggerProvider.
MuxWriter an *os.File writer with locker.
SMTPLogger implements LoggerProvider and is used to send emails via given SMTP-server.
WriterLogger represent a basic logger for Gitea.
# Interfaces
ColorFormatted structs provide their own colored string when formatted with ColorSprintf.
EventLogger represents the behaviours of a logger.
LoggerProvider represents behaviors of a logger provider.