package
1.27.3
Repository: https://github.com/teambition/gear.git
Documentation: pkg.go.dev

# Functions

Alert produce a "Alert" log with the default logger.
Crit produce a "Critical" log with the default logger.
Debug produce a "Debug" log with the default logger.
Debugf produce a "Debug" log in the manner of fmt.Printf with the default logger.
Default returns the default logger If devMode is true, logger will print a simple version of Common Log Format with terminal color.
Emerg produce a "Emergency" log with the default logger.
Err produce a "Error" log with the default logger.
Fatal produce a "Emergency" log with the default logger and then calls os.Exit(1).
FprintWithColor formats string with terminal colors and writes to w.
FromCtx retrieve the Log instance for the default logger.
Info produce a "Informational" log with the default logger.
New creates a Logger instance with given io.Writer and DebugLevel log level.
Notice produce a "Notice" log with the default logger.
Panic produce a "Emergency" log with the default logger and then calls panic with the message.
ParseLevel takes a string level and returns the gear logging level constant.
Print produce a log in the manner of fmt.Print with the default logger, without timestamp and log level.
Printf produce a log in the manner of fmt.Printf with the default logger, without timestamp and log level.
Println produce a log in the manner of fmt.Println with the default logger, without timestamp and log level.
SetLoggerLevel set a string level to the logger.
SetTo sets key/value to the Log instance on ctx for the default logger.
Warning produce a "Warning" log with the default logger.

# Constants

AlertLevel is 1, "Alert", action must be taken immediately.
Color Code https://en.wikipedia.org/wiki/ANSI_escape_code 30–37: set text color to one of the colors 0 to 7, 40–47: set background color to one of the colors 0 to 7, 39: reset text color to default, 49: reset background color to default, 1: make text bold / bright (this is the standard way to access the bright color variants), 22: turn off bold / bright effect, and 0: reset all text properties (color, background, brightness, etc.) to their default values.
Color Code https://en.wikipedia.org/wiki/ANSI_escape_code 30–37: set text color to one of the colors 0 to 7, 40–47: set background color to one of the colors 0 to 7, 39: reset text color to default, 49: reset background color to default, 1: make text bold / bright (this is the standard way to access the bright color variants), 22: turn off bold / bright effect, and 0: reset all text properties (color, background, brightness, etc.) to their default values.
Color Code https://en.wikipedia.org/wiki/ANSI_escape_code 30–37: set text color to one of the colors 0 to 7, 40–47: set background color to one of the colors 0 to 7, 39: reset text color to default, 49: reset background color to default, 1: make text bold / bright (this is the standard way to access the bright color variants), 22: turn off bold / bright effect, and 0: reset all text properties (color, background, brightness, etc.) to their default values.
Color Code https://en.wikipedia.org/wiki/ANSI_escape_code 30–37: set text color to one of the colors 0 to 7, 40–47: set background color to one of the colors 0 to 7, 39: reset text color to default, 49: reset background color to default, 1: make text bold / bright (this is the standard way to access the bright color variants), 22: turn off bold / bright effect, and 0: reset all text properties (color, background, brightness, etc.) to their default values.
Color Code https://en.wikipedia.org/wiki/ANSI_escape_code 30–37: set text color to one of the colors 0 to 7, 40–47: set background color to one of the colors 0 to 7, 39: reset text color to default, 49: reset background color to default, 1: make text bold / bright (this is the standard way to access the bright color variants), 22: turn off bold / bright effect, and 0: reset all text properties (color, background, brightness, etc.) to their default values.
Color Code https://en.wikipedia.org/wiki/ANSI_escape_code 30–37: set text color to one of the colors 0 to 7, 40–47: set background color to one of the colors 0 to 7, 39: reset text color to default, 49: reset background color to default, 1: make text bold / bright (this is the standard way to access the bright color variants), 22: turn off bold / bright effect, and 0: reset all text properties (color, background, brightness, etc.) to their default values.
Color Code https://en.wikipedia.org/wiki/ANSI_escape_code 30–37: set text color to one of the colors 0 to 7, 40–47: set background color to one of the colors 0 to 7, 39: reset text color to default, 49: reset background color to default, 1: make text bold / bright (this is the standard way to access the bright color variants), 22: turn off bold / bright effect, and 0: reset all text properties (color, background, brightness, etc.) to their default values.
Color Code https://en.wikipedia.org/wiki/ANSI_escape_code 30–37: set text color to one of the colors 0 to 7, 40–47: set background color to one of the colors 0 to 7, 39: reset text color to default, 49: reset background color to default, 1: make text bold / bright (this is the standard way to access the bright color variants), 22: turn off bold / bright effect, and 0: reset all text properties (color, background, brightness, etc.) to their default values.
CritiLevel is an alias of CritLevel.
CritLevel is 2, "Critical", critical conditions.
DebugLevel is 7, "Debug", debug-level messages.
EmergLevel is 0, "Emergency", system is unusable.
ErrLevel is 3, "Error", error conditions.
InfoLevel is 6, "Informational", informational messages.
NoticeLevel is 5, "Notice", normal but significant condition.
WarningLevel is 4, "Warning", warning conditions.

# Structs

A Logger represents an active logging object that generates lines of output to an io.Writer.

# Interfaces

Messager is implemented by any value that has a Format method and a String method.

# Type aliases

ColorType represents terminal color.
Level represents logging level https://tools.ietf.org/html/rfc5424 https://en.wikipedia.org/wiki/Syslog.
Log records key-value pairs for structured logging.