Documentation ¶
Index ¶
Constants ¶
View Source
const ( TextConsoleFormatter = ConsoleFormatter("text") TextColorfulConsoleFormatter = ConsoleFormatter("text_colorful") JsonConsoleFormatter = ConsoleFormatter("json") )
View Source
const ( Stdout = ConsoleWriterOutType("stdout") Stderr = ConsoleWriterOutType("stderr") Stdmix = ConsoleWriterOutType("stdout_stderr") )
View Source
const ( Debug = Level("debug") Info = Level("info") Warn = Level("warn") Error = Level("error") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Level Level `json:"level,omitempty" yaml:"level,omitempty"` Formatter ConsoleFormatter `json:"formatter,omitempty" yaml:"formatter,omitempty"` Console ConsoleWriterOutType `json:"console,omitempty" yaml:"console,omitempty"` DisableConsole bool `json:"disableConsole,omitempty" yaml:"disableConsole,omitempty"` Consumes int `json:"consumes,omitempty" yaml:"consumes,omitempty"` Buffer int `json:"buffer,omitempty" yaml:"buffer,omitempty"` SendTimeout string `json:"sendTimeout,omitempty" yaml:"sendTimeout,omitempty"` ShutdownTimeout string `json:"shutdownTimeout,omitempty" yaml:"shutdownTimeout,omitempty"` Writers []WriterConfig `json:"writers,omitempty" yaml:"writer,omitempty"` }
type ConsoleFormatter ¶ added in v1.2.0
type ConsoleFormatter string
func (ConsoleFormatter) Code ¶ added in v1.2.0
func (formatter ConsoleFormatter) Code() logs.ConsoleWriterFormatter
type ConsoleWriterOutType ¶ added in v1.2.0
type ConsoleWriterOutType string
func (ConsoleWriterOutType) Code ¶ added in v1.2.0
func (ot ConsoleWriterOutType) Code() logs.ConsoleWriterOutType
type WriterConfig ¶
type WriterConfig struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Options json.RawMessage `json:"options,omitempty" yaml:"options,omitempty"` }
func (WriterConfig) Config ¶ added in v1.2.0
func (writer WriterConfig) Config() (v configures.Config, err error)
type WriterOptions ¶
type WriterOptions struct {
Config configures.Config
}
Click to show internal directories.
Click to hide internal directories.