Documentation ¶
Index ¶
- Variables
- func ConvertToStandardLogger(logger Logger, level Level, withCaller bool) (v *log.Logger)
- type Caller
- type ColorableLevelWriterTo
- type ConsoleWriter
- type ConsoleWriterFormatter
- type ConsoleWriterOutType
- type Entry
- type EntryEncoder
- type Error
- type Event
- type Events
- type Field
- type Fields
- type JsonEntryEncoder
- type Level
- type Logger
- type Option
- func DisableConsoleWriter() Option
- func WithBuffer(size int) Option
- func WithConsoleWriterFormatter(formatter ConsoleWriterFormatter) Option
- func WithConsoleWriterOutType(typ ConsoleWriterOutType) Option
- func WithConsumes(consumes int) Option
- func WithLevel(value Level) Option
- func WithSendTimeout(timeout time.Duration) Option
- func WithShutdownTimeout(timeout time.Duration) Option
- func WithTimeoutDiscardLevel(value Level) Option
- func WithWriter(writers ...Writer) Option
- type Options
- type Sink
- type TextEntryEncoder
- type Timers
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCloseTimeout = errors.New("logs: close time out")
)
Functions ¶
Types ¶
type Caller ¶ added in v1.13.10
func (Caller) MarshalJSON ¶ added in v1.13.10
type ColorableLevelWriterTo ¶ added in v1.13.10
type ColorableLevelWriterTo struct {
// contains filtered or unexported fields
}
type ConsoleWriter ¶ added in v1.13.10
type ConsoleWriter struct {
// contains filtered or unexported fields
}
func (*ConsoleWriter) Close ¶ added in v1.13.10
func (writer *ConsoleWriter) Close() (err error)
func (*ConsoleWriter) Write ¶ added in v1.13.10
func (writer *ConsoleWriter) Write(entry Entry)
type ConsoleWriterFormatter ¶ added in v1.13.10
type ConsoleWriterFormatter int
const ( TextFormatter ConsoleWriterFormatter = iota ColorTextFormatter JsonFormatter )
type ConsoleWriterOutType ¶ added in v1.13.10
type ConsoleWriterOutType int
const ( StdOut ConsoleWriterOutType = iota StdErr StdMix )
type Entry ¶ added in v1.13.10
type Entry struct { Level Level Occur time.Time Message string Fields Fields Cause Error Caller Caller }
func (Entry) MarshalJSON ¶ added in v1.13.10
type EntryEncoder ¶ added in v1.13.10
type Events ¶ added in v1.13.10
type Events struct {
// contains filtered or unexported fields
}
type Field ¶
func (Field) MarshalJSON ¶ added in v1.13.10
func (Field) ValueBytes ¶ added in v1.13.10
type JsonEntryEncoder ¶ added in v1.13.10
type JsonEntryEncoder struct { }
func (*JsonEntryEncoder) Encode ¶ added in v1.13.10
func (encoder *JsonEntryEncoder) Encode(entry Entry) (p []byte)
type Level ¶ added in v1.1.0
type Level int
func (Level) ColorableLevelWriterTo ¶ added in v1.13.10
func (Level) MarshalJSON ¶ added in v1.13.10
type Logger ¶ added in v1.1.0
type Option ¶ added in v1.1.0
func DisableConsoleWriter ¶ added in v1.13.10
func DisableConsoleWriter() Option
func WithBuffer ¶ added in v1.13.10
func WithConsoleWriterFormatter ¶ added in v1.13.10
func WithConsoleWriterFormatter(formatter ConsoleWriterFormatter) Option
func WithConsoleWriterOutType ¶ added in v1.13.10
func WithConsoleWriterOutType(typ ConsoleWriterOutType) Option
func WithConsumes ¶ added in v1.13.10
func WithSendTimeout ¶ added in v1.13.10
func WithShutdownTimeout ¶ added in v1.13.10
func WithTimeoutDiscardLevel ¶ added in v1.13.10
func WithWriter ¶ added in v1.13.10
type TextEntryEncoder ¶ added in v1.13.10
type TextEntryEncoder struct {
// contains filtered or unexported fields
}
func (*TextEntryEncoder) Encode ¶ added in v1.13.10
func (encoder *TextEntryEncoder) Encode(entry Entry) (p []byte)
type Timers ¶ added in v1.13.10
type Timers struct {
// contains filtered or unexported fields
}
type Writer ¶ added in v1.1.0
func NewConsoleWriter ¶ added in v1.13.10
func NewConsoleWriter(formatter ConsoleWriterFormatter, out ConsoleWriterOutType) (w Writer)
Click to show internal directories.
Click to hide internal directories.