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() error
- func LevelName(level int) string
- func NameLevel(name string) int
- func OpenLogFile(path string, name string) (*os.File, error)
- func PruneLogFiles(logPath string) error
- func Warning(a ...interface{})
- func Warningf(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) GetLevel() int
- func (l *Logger) GetLogFileSize() (int64, error)
- 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) SetDebugLevel(level int) error
- func (l *Logger) Warning(a ...interface{})
- func (l *Logger) Warningf(format string, a ...interface{})
Constants ¶
View Source
const ( Red = "0;31" Green = "0;32" Yellow = "0;33" Magenta = "0;35" Cyan = "0;36" )
View Source
const (
LogFileExt = ".log"
)
Variables ¶
View Source
var (
Stdout = os.Stdout
)
Functions ¶
func PruneLogFiles ¶
Types ¶
type Logger ¶
var Log *Logger
var WebLog *Logger
func (*Logger) GetLogFileSize ¶
func (*Logger) SetDebugLevel ¶
Click to show internal directories.
Click to hide internal directories.