Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(v ...any)
- func Debugf(format string, v ...any)
- func Error(v ...any)
- func Errorf(format string, v ...any)
- func Exit(v ...any)
- func Info(v ...any)
- func Infof(format string, v ...any)
- func NewList() *list
- func NewTable() *table
- func OneLine(format string, v ...any)
- func Printf(format string, v ...any)
- func Println(v ...any)
- func Warning(v ...any)
- func Warningf(format string, v ...any)
- type Color
- type Colors
- type Entry
- type Field
- type Formatter
- type Hook
- type JsonFormatter
- type Level
- type Logger
- func (l *Logger) AddField(key string, value any)
- func (l *Logger) Debug(args ...any)
- func (l *Logger) Debugf(format string, args ...any)
- func (l *Logger) Error(args ...any)
- func (l *Logger) Errorf(format string, args ...any)
- func (l *Logger) Info(args ...any)
- func (l *Logger) Infof(format string, args ...any)
- func (l *Logger) SetFields(fields ...Field)
- func (l *Logger) Warning(args ...any)
- func (l *Logger) Warningf(format string, args ...any)
- type SortMode
- type TextFormatter
Constants ¶
View Source
const ( NONE = 0 LEVEL = 1 << iota TIME FILE )
Variables ¶
View Source
var DefaultLogger = NewLogger()
View Source
var Pretty pretty
Functions ¶
Types ¶
type Color ¶
type Color int
const ( Reset Color = iota Bold Faint Italic Underline BlinkSlow BlinkRapid ReverseVideo Concealed CrossedOut )
Base colors -- attributes in reality
Foreground colors
const ( FgHiBlack Color = iota + 90 FgHiRed FgHiGreen FgHiYellow FgHiBlue FgHiMagenta FgHiCyan FgHiWhite )
Foreground Hi-Intensity colors
Background colors
type JsonFormatter ¶
type JsonFormatter struct{}
func NewJsonFormatter ¶
func NewJsonFormatter() *JsonFormatter
func (*JsonFormatter) Format ¶
func (f *JsonFormatter) Format(entry *Entry) string
type Logger ¶
type SortMode ¶
type SortMode int
const ( // Asc sorts the column in Ascending order alphabetically. Asc SortMode = iota // AscNumeric sorts the column in Ascending order numerically. AscNumeric // Dsc sorts the column in Descending order alphabetically. Dsc // DscNumeric sorts the column in Descending order numerically. DscNumeric )
type TextFormatter ¶
type TextFormatter struct{}
func NewTextFormatter ¶
func NewTextFormatter() *TextFormatter
func (*TextFormatter) Format ¶
func (f *TextFormatter) Format(entry *Entry) string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.