Documentation ¶
Overview ¶
Package logtor provides constants and utility functions related to logging, including LogLevel constants, LogCreatorName type, color codes for different log levels, and functions for color formatting and checking whether a log level is acceptable based on a selected level.
Variables:
- ResetColor: ANSI escape code to reset color.
- NoneColor, FatalColor, ErrorColor, WarnColor, DebugColor, InfoColor, TraceColor: ANSI escape codes for log level colors.
Constants: - LogLevel: Represents different log levels (NONE, FATAL, ERROR, WARN, DEBUG, INFO, TRACE). - LogCreatorName: Represents the names of log creators. - Color Codes: ANSI escape codes for log level colors.
Functions: - GetColorForLogLevel: Returns the ANSI escape code for the color associated with a log level. - IsLogLevelAcceptable: Checks if a given log level is acceptable based on the selected log level.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ResetColor = "\033[0m" NoneColor = "\033[97m" FatalColor = "\033[31m" ErrorColor = "\033[31m" WarnColor = "\033[33m" DebugColor = "\033[32m" InfoColor = "\033[34m" TraceColor = "\033[35m" )
Functions ¶
func GetColorForLogLevel ¶
func IsLogLevelAcceptable ¶
Types ¶
type LogCreatorName ¶
type LogCreatorName string