# README
glog
Colorful Golang logger for use with CLI projects
Usage Example
go run example/main.go
Output Example
Notes
Please be aware that this package bears no relation whatsoever to Golang's glog package or Google's glog package.
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
Auto will automatically choose a highlighter based on the type of the given `interface{}`s.
No description provided by the author
Bool colors the given booleans.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Date parses the date portion of `t`, formats it (2006-01-02).
DateTime parses `t`, formats it (2006-01-02 15:04:05).
DateTime12hr parses `t`, formats it as AM/PM (2006-01-02 03:04:05pm).
Duration explodes the result of (time.Duration).String() into its segments and colors them.
DurationMilliseconds explodes the result of (time.Duration).String() into its segments and colors them.
DurationShort colors the same way as Float() does but will make `n` human-readable using time suffixes.
Error colors `err.Error()` according to the config, or returns "nil" if no error was present.
File colors `file` according to the config using the `os.PathSeparator`.
Float formats `n` with the given `precision` and colors the result.
No description provided by the author
No description provided by the author
Highlight colorizes each given string (identical strings always get the same color).
HighlightDebug colorizes the `message`.
HighlightError colorizes the `message`.
HighlightInfo colorizes the `message`.
HighlightNotOK colorizes the `message`.
HighlightOK colorizes the `message`.
HighlightQuestion colorizes the `message`.
HighlightSuccess colorizes the `message`.
HighlightTrace colorizes the `message`.
HighlightWarning colorizes the `message`.
HumanReadableBytesIEC colors the same way as Float() does but will make `bytes` human-readable using IEC-prefixes (base1024).
HumanReadableBytesSI colors the same way as Float() does but will make `bytes` human-readable using SI-prefixes (base1000).
HumanReadableIEC colors the same way as Float() does but will make `n` human-readable using IEC-prefixes (base1024).
HumanReadableLong colors the same way as Float() does but will make `n` human-readable using long scale suffixes (base1000).
HumanReadableRateBytesIEC colors the same way as Float() does but will make `bytes` human-readable using IEC-prefixes (base1024).
HumanReadableRateBytesSI colors the same way as Float() does but will make `bytes` human-readable using SI-prefixes (base1000).
HumanReadableRateIEC colors the same way as Float() does but will make `n` human-readable using IEC-prefixes (base1024).
HumanReadableRateIEC colors the same way as Float() does but will make `n` human-readable using IEC-prefixes (base1024).
HumanReadableShort colors the same way as Float() does but will make `n` human-readable using short scale suffixes (base1000).
HumanReadableSI colors the same way as Float() does but will make `n` human-readable using SI-prefixes (base1000).
Int colors the given ints.
IntAmount colors `n` as int and appends either the given singular (`n` == 1) or plural (`n` > 1 || `n` == 0).
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
MapColor translates `index` from glog's color table to the corresponding ANSI color index.
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
NewLogger creates a new Logger instance with the given ID and settings.
NewLoggerSimple creates a new Logger instance with the given ID, automatically chosen color, and without debug mode or message handler.
No description provided by the author
No description provided by the author
Related config setting(s):
- `LoggerConfig.TablePadChar`.
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
No description provided by the author
Password colors `password` according to the config.
Percentage assumes `n` to be normalized (0..1), multiplies it with 100, formats it with the given `precision` and colors the result.
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
Reason colors `reason` according to the config.
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
Runtime determines the number of seconds passed since program start.
RuntimeMilliseconds determines the number of milliseconds passed since program start.
SplitHostPort takes a "IP:Port" formatted string and returns the port as integer and the ip portion as string.
No description provided by the author
No description provided by the author
No description provided by the author
Time parses the time portion of `t`, formats it (15:04:05).
Time12hr parses the time portion of `t`, formats it as AM/PM (03:04:05pm).
TimeCustom formats `t` according to the given format.
Timestamp uses the current time, formats it as Unix timestamp (seconds).
Uint colors the given uints.
No description provided by the author
URL colorizes a URL and, if enabled, marks dead ones (based on a DNS check).
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
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
No description provided by the author
No description provided by the author
# Constants
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
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
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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
this controls how many frames to skip, so we can avoid to expose ourselves in every stack trace.
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
# Variables
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
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
# Interfaces
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