Documentation
¶
Index ¶
- Constants
- func D(v ...interface{})
- func DisableColor(disable bool)
- func E(v ...interface{})
- func F(v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func I(v ...interface{})
- func Prefix() string
- func Print(v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func SetFile(file string)
- func SetFormat(format string)
- func SetLevel(level int)
- func SetPrefix(prefix string)
- func Start(msg ...string) (func(...string), func())
- func W(v ...interface{})
- type Format
- type Frame
- type Logger
- func (l *Logger) D(v ...interface{})
- func (l *Logger) DisableColor(disable bool)
- func (l *Logger) E(v ...interface{})
- func (l *Logger) F(v ...interface{})
- func (l *Logger) Format(level int) *Format
- func (l *Logger) I(v ...interface{})
- func (l *Logger) Prefix() string
- func (l *Logger) Print(v ...interface{})
- func (l *Logger) Println(v ...interface{})
- func (l *Logger) SetCallDepth(depth int)
- func (l *Logger) SetFile(file string)
- func (l *Logger) SetFormat(format string)
- func (l *Logger) SetLevelFormat(level int, format string)
- func (l *Logger) SetPrefix(prefix string)
- func (l *Logger) Start(msg ...string) (func(...string), func())
- func (l *Logger) W(v ...interface{})
- type Session
Constants ¶
const ( DefaultFormat = `[%level%] %date% %time% (%file%) ` DefaultFile = `logs/application.log` )
const ( LevelAll = iota LevelDebug LevelInfo LevelWarn LevelError LevelFatal )
Variables ¶
This section is empty.
Functions ¶
func DisableColor ¶ added in v0.6.0
func DisableColor(disable bool)
func Fatal ¶ added in v0.2.0
func Fatal(v ...interface{})
Equivalent to Print() followed by a call to os.Exit(1). Compatibility for built-in go logging library
func Fatalf ¶ added in v0.2.0
func Fatalf(format string, v ...interface{})
Equivalent to Printf() followed by a call to os.Exit(1). Compatibility for built-in go logging library
func Fatalln ¶ added in v0.2.0
func Fatalln(v ...interface{})
Alias for F() Compatibility for built-in go logging library
func Prefix ¶ added in v0.2.0
func Prefix() string
Return the output prefix for the standard logger.
func Print ¶ added in v0.2.0
func Print(v ...interface{})
Calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Print. Compatibility for built-in go logging library
func Printf ¶ added in v0.2.0
func Printf(format string, v ...interface{})
Calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Printf. Compatibility for built-in go logging library
func Println ¶ added in v0.2.0
func Println(v ...interface{})
Calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Println. Compatibility for built-in go logging library
Types ¶
type Frame ¶ added in v0.2.2
func Stacktrace ¶ added in v0.2.1
type Logger ¶
func NewWithFile ¶ added in v0.3.0
func NewWithFormat ¶ added in v0.3.0
func (*Logger) DisableColor ¶ added in v0.6.0
func (*Logger) F ¶
func (l *Logger) F(v ...interface{})
Equivalent to Print() followed by a call to os.Exit(1).