Documentation ¶
Index ¶
- Constants
- type ILogger
- type Level
- type LogHelper
- type Logger
- func (instance *Logger) Close()
- func (instance *Logger) Debug(args ...interface{})
- func (instance *Logger) Debugf(message string, args ...interface{})
- func (instance *Logger) Error(args ...interface{})
- func (instance *Logger) Errorf(message string, args ...interface{})
- func (instance *Logger) Flush()
- func (instance *Logger) GetDateFormat() (response string)
- func (instance *Logger) GetFilename() string
- func (instance *Logger) GetLevel() Level
- func (instance *Logger) GetMessageFormat() (response string)
- func (instance *Logger) HasRotatedBeforeLastWrite() bool
- func (instance *Logger) Info(args ...interface{})
- func (instance *Logger) Infof(message string, args ...interface{})
- func (instance *Logger) LastRotationTime() time.Time
- func (instance *Logger) OutConsole(value bool) *Logger
- func (instance *Logger) OutFile(value bool) *Logger
- func (instance *Logger) Panic(args ...interface{})
- func (instance *Logger) Panicf(message string, args ...interface{})
- func (instance *Logger) Rotate() (err error)
- func (instance *Logger) RotateEnable(value bool) *Logger
- func (instance *Logger) RotateMaxSizeMb(value float64) *Logger
- func (instance *Logger) SetDateFormat(format string) *Logger
- func (instance *Logger) SetFilename(filename string) *Logger
- func (instance *Logger) SetLevel(v interface{}) *Logger
- func (instance *Logger) SetMessageFormat(format string) *Logger
- func (instance *Logger) String() string
- func (instance *Logger) Trace(args ...interface{})
- func (instance *Logger) Tracef(message string, args ...interface{})
- func (instance *Logger) Warn(args ...interface{})
- func (instance *Logger) Warnf(message string, args ...interface{})
Constants ¶
View Source
const (
DateFormatStandard = "yyyy-MM-dd HH:mm:ss"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level uint32
Level type
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel Level = iota // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel )
func ParseLevel ¶
func (Level) MarshalText ¶
func (*Level) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) GetDateFormat ¶
func (*Logger) GetFilename ¶
func (*Logger) GetMessageFormat ¶
func (*Logger) HasRotatedBeforeLastWrite ¶ added in v0.2.92
func (*Logger) LastRotationTime ¶ added in v0.2.92
func (*Logger) OutConsole ¶
func (*Logger) RotateEnable ¶
func (*Logger) RotateMaxSizeMb ¶
func (*Logger) SetDateFormat ¶
func (*Logger) SetFilename ¶
func (*Logger) SetMessageFormat ¶
Click to show internal directories.
Click to hide internal directories.