Documentation ¶
Index ¶
- Constants
- Variables
- func Color(code, msg string) string
- func Debug(a ...interface{})
- func Debugf(format string, a ...interface{})
- func Error(a ...interface{})
- func Errorf(format string, a ...interface{})
- func Fatal(a ...interface{})
- func Fatalf(format string, a ...interface{})
- func GetGID() uint64
- func Info(a ...interface{})
- func Infof(format string, a ...interface{})
- func Init(level int, maxPerLogSizeMb, maxLogsSizeMb int64)
- func LevelName(level int) string
- func SortLogFiles(files []os.FileInfo)
- func Trace(a ...interface{})
- func Tracef(format string, a ...interface{})
- func Warn(a ...interface{})
- func Warnf(format string, a ...interface{})
- type Logger
- func (l *Logger) Debug(a ...interface{})
- func (l *Logger) Debugf(format string, a ...interface{})
- func (l *Logger) Error(a ...interface{})
- func (l *Logger) Errorf(format string, a ...interface{})
- func (l *Logger) Fatal(a ...interface{})
- func (l *Logger) Fatalf(format string, a ...interface{})
- func (l *Logger) Info(a ...interface{})
- func (l *Logger) Infof(format string, a ...interface{})
- func (l *Logger) Output(level int, a ...interface{}) error
- func (l *Logger) Outputf(level int, format string, v ...interface{}) error
- func (l *Logger) SetPrintLevel(level int) error
- func (l *Logger) Trace(a ...interface{})
- func (l *Logger) Tracef(format string, a ...interface{})
- func (l *Logger) Warn(a ...interface{})
- func (l *Logger) Warnf(format string, a ...interface{})
Constants ¶
View Source
const ( Blue = "0;34" Red = "0;31" Green = "0;32" Yellow = "0;33" Cyan = "0;36" Pink = "1;35" )
View Source
const ( OutputPath = "./Logs/" // The log files output path KB_SIZE = int64(1024) MB_SIZE = KB_SIZE * 1024 GB_SIZE = MB_SIZE * 1024 )
Variables ¶
View Source
var (
Stdout = os.Stdout
)
Functions ¶
func SortLogFiles ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
var Log *Logger
func (*Logger) SetPrintLevel ¶
Click to show internal directories.
Click to hide internal directories.