Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultConsoleTimeLayout string = "15:04:05.000" DefaultConsoleMinMessageWidth int16 = 50 DefaultConsoleLevelWidth int8 = -5 )
View Source
const (
DefaultLevelKey = "level"
)
Variables ¶
View Source
var (
DefaultConsole = NewConsole()
)
View Source
var (
DefaultJson = NewJson()
)
Functions ¶
This section is empty.
Types ¶
type Console ¶
type Console struct { PrintGlobalLogger bool ColorMode color.Mode MinMessageWidth *int16 LevelWidth *int8 LevelBasedColorizer color.LevelBasedColorizer TimeLayout string FieldValueFormatter ValueFormatter }
func NewConsole ¶
func NewConsole() *Console
type FieldValueFormatterAware ¶
type FieldValueFormatterAware interface { GetValueFormatter() ValueFormatter SetValueFormatter(ValueFormatter) }
type Formatter ¶
var (
Default Formatter = DefaultConsole
)
type SimpleValueFormatter ¶
type SimpleValueFormatter struct {
QuoteType QuoteType
}
func (*SimpleValueFormatter) FormatValue ¶
func (instance *SimpleValueFormatter) FormatValue(v interface{}, _ log.Provider) ([]byte, error)
type ValueFormatter ¶
var (
DefaultValueFormatter ValueFormatter = &SimpleValueFormatter{}
)
Click to show internal directories.
Click to hide internal directories.