Documentation ¶
Index ¶
- func Cleanup()
- func Debug(msg ...interface{})
- func Debugf(format string, msg ...interface{})
- func Error(msg ...interface{})
- func Errorf(format string, msg ...interface{})
- func Info(msg ...interface{})
- func Infof(format string, msg ...interface{})
- func Warn(msg ...interface{})
- func Warnf(format string, msg ...interface{})
- type Glogger
- type JSONGlog
- func (g *JSONGlog) Cleanup()
- func (g *JSONGlog) Debug(msg ...interface{})
- func (g *JSONGlog) Debugf(format string, msg ...interface{})
- func (g *JSONGlog) Error(msg ...interface{})
- func (g *JSONGlog) Errorf(format string, msg ...interface{})
- func (g *JSONGlog) Info(msg ...interface{})
- func (g *JSONGlog) Infof(format string, msg ...interface{})
- func (g *JSONGlog) Warn(msg ...interface{})
- func (g *JSONGlog) Warnf(format string, msg ...interface{})
- type LogLevel
- type LoggerJson
- type Options
- type UnstructureGlog
- func (g *UnstructureGlog) Cleanup()
- func (g *UnstructureGlog) Debug(msg ...interface{})
- func (g *UnstructureGlog) Debugf(format string, msg ...interface{})
- func (g *UnstructureGlog) Error(msg ...interface{})
- func (g *UnstructureGlog) Errorf(format string, msg ...interface{})
- func (g *UnstructureGlog) Info(msg ...interface{})
- func (g *UnstructureGlog) Infof(format string, msg ...interface{})
- func (g *UnstructureGlog) Warn(msg ...interface{})
- func (g *UnstructureGlog) Warnf(format string, msg ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶ added in v1.1.0
func Debugf(format string, msg ...interface{})
Debug logs the warning message to the file
func Errorf ¶ added in v1.1.0
func Errorf(format string, msg ...interface{})
Error logs the error message to the file
Types ¶
type Glogger ¶
type Glogger interface { Error(...interface{}) // error logger without format Warn(...interface{}) // warning logger without format Info(...interface{}) // info logger without format Debug(...interface{}) // debug logger without format Errorf(string, ...interface{}) // error logger with format Warnf(string, ...interface{}) // warning logger with format Infof(string, ...interface{}) // info logger with format Debugf(string, ...interface{}) // debug logger with format Cleanup() // safely close the glogger // contains filtered or unexported methods }
Glogger is the interface for controlling logging
func NewDefaultGlogger ¶ added in v1.1.0
func NewDefaultGlogger() Glogger
NewDefaultGlogger creates a new Glog object for stdout and options for formatting
func NewJSONGlogger ¶ added in v1.1.0
NewJSONGlogger creates a new Glog object with the given file name and options for formatting the log messages. The file is created if it does not exist. The file is opened in append mode. The log messages are queued and written to the file in a separate goroutine. The queue is unbuffered.
func NewUnstructureGlogger ¶ added in v1.1.0
NewUnstructureGlogger creates a new Glog object with the given file name and options for formatting the log messages. The file is created if it does not exist. The file is opened in append mode. The log messages are queued and written to the file in a separate goroutine. The queue is unbuffered.
type JSONGlog ¶
type JSONGlog struct {
// contains filtered or unexported fields
}
JSONGlog type is the logger data for logging concurrently to file easyjson:skip
func (*JSONGlog) Debug ¶
func (g *JSONGlog) Debug(msg ...interface{})
Debug logs the warning message to the file
func (*JSONGlog) Error ¶
func (g *JSONGlog) Error(msg ...interface{})
Error logs the error message to the file
func (*JSONGlog) Info ¶
func (g *JSONGlog) Info(msg ...interface{})
Info logs the warning message to the file
type LoggerJson ¶
type LoggerJson struct { Time string `json:"time"` Type string `json:"type"` File string `json:"file"` Line string `json:"line"` Msg map[string]interface{} `json:"msg"` }
easyjson:json
func (LoggerJson) MarshalJSON ¶
func (v LoggerJson) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
type UnstructureGlog ¶
type UnstructureGlog struct {
// contains filtered or unexported fields
}
UnstructureGlog type is the logger data for logging concurrently to file
func (*UnstructureGlog) Cleanup ¶
func (g *UnstructureGlog) Cleanup()
safely close the custom logger
func (*UnstructureGlog) Debug ¶
func (g *UnstructureGlog) Debug(msg ...interface{})
Debug logs the warning message to the file
func (*UnstructureGlog) Debugf ¶ added in v1.1.0
func (g *UnstructureGlog) Debugf(format string, msg ...interface{})
Debug logs the warning message to the file
func (*UnstructureGlog) Error ¶
func (g *UnstructureGlog) Error(msg ...interface{})
Error logs the error message to the file
func (*UnstructureGlog) Errorf ¶ added in v1.1.0
func (g *UnstructureGlog) Errorf(format string, msg ...interface{})
Error logs the error message to the file
func (*UnstructureGlog) Info ¶
func (g *UnstructureGlog) Info(msg ...interface{})
Info logs the warning message to the file
func (*UnstructureGlog) Infof ¶ added in v1.1.0
func (g *UnstructureGlog) Infof(format string, msg ...interface{})
Info logs the warning message to the file
func (*UnstructureGlog) Warn ¶
func (g *UnstructureGlog) Warn(msg ...interface{})
Warn logs the warning message to the file
func (*UnstructureGlog) Warnf ¶ added in v1.1.0
func (g *UnstructureGlog) Warnf(format string, msg ...interface{})
Warn logs the warning message to the file