package
1.24.0-dev
Repository: https://github.com/go-gitea/gitea.git
Documentation: pkg.go.dev

# Functions

BaseLoggerToGeneralLogger wraps a BaseLogger (which only has Log() function) to a Logger (which has Info() function).
ColorBytes converts a list of ColorAttributes to a byte array.
ColoredMethod adds colors for HTTP methods on log.
ColoredStatus adds colors for HTTP status.
ColoredTime converts the provided time to a ColoredValue for logging.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EventFormatTextMessage makes the log message for a writer with its mode.
FallbackErrorf is the last chance to show an error if the logger has internal errors.
Fatal records fatal log and exit process.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LevelFromString takes a level string and returns a Level.
No description provided by the author
LoggerToWriter wraps a log function to an io.Writer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Stack will skip back the provided number of frames and return a stack trace with source code.
No description provided by the author
No description provided by the author

# 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.
most logger frameworks doesn't support CRITICAL, and it doesn't seem useful.
Base ColorAttributes.
No description provided by the author
No description provided by the author
No description provided by the author
Base ColorAttributes.
No description provided by the author
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.
No description provided by the author
Base ColorAttributes.
the date in the local time zone: 2009/01/23.
No description provided by the author
function name of the caller: runtime.Caller().
the Goroutine-PID of the context.
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.
default.
the time in the local time zone: 01:23:23.
if Ldate or Ltime is set, use UTC rather than the local time zone.
No description provided by the author
Base ColorAttributes.
Base ColorAttributes.
No description provided by the author
No description provided by the author
Base ColorAttributes.
No description provided by the author

# 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.
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LoggerManager manages loggers and shared event writers.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WriterMode is the mode for creating a new EventWriter, it contains common options for all writers Its WriterOption field is the specified options for a writer, it should be passed by value but not by pointer.

# Interfaces

BaseLogger provides the basic logging functions.
EventWriter is the general interface for all event writers EventWriterBase is only used as its base interface A writer implementation could override the default EventWriterBase functions eg: a writer can override the Run to handle events in its own way with its own goroutine.
EventWriterBase is the base interface for most event writers It provides default implementations for most methods.
LevelLogger provides level-related logging functions.
No description provided by the author
No description provided by the author

# Type aliases

ColorAttribute defines a single SGR Code.
No description provided by the author
EventWriterProvider is the function for creating a new EventWriter.
Level is the level of the logger.