Documentation ¶
Overview ¶
Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Index ¶
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
- type Entry
- type Formatter
- type Level
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) SetOutput(out io.Writer)
- func (l *Logger) Warning(v ...interface{})
- func (l *Logger) Warningf(format string, v ...interface{})
- func (l *Logger) WithDepth(depth int) *Logger
- type TextFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger provides a struct with fields that describe the details of logger.
type TextFormatter ¶
type TextFormatter struct {
// contains filtered or unexported fields
}
TextFormatter represents a kind of formatter that formats the logs as plain text
func NewTextFormatter ¶
func NewTextFormatter() *TextFormatter
NewTextFormatter returns a TextFormatter, the format of time is time.RFC3339
func (*TextFormatter) Format ¶
func (t *TextFormatter) Format(e *Entry) (b []byte, err error)
Format formats the logs as "time [level] line message"
func (*TextFormatter) SetTimeFormat ¶
func (t *TextFormatter) SetTimeFormat(fmt string)
SetTimeFormat sets time format of TextFormatter if the parameter fmt is not null