Documentation ¶
Index ¶
Constants ¶
View Source
const ( LogLevelFatal = iota LogLevelError LogLevelInfo LogLevelDebug )
View Source
const ( LogTypeNull = iota LogTypeStdout LogTypeStdoutColor LogTypeSyslog LogTypeFile )
Variables ¶
View Source
var (
ErrInvalidLogType = errors.New("Invalid log type")
)
Functions ¶
func NewFileRotate ¶ added in v0.2.0
age may be 0. size may be 0
Types ¶
type Log ¶
type Log interface { Fatalf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Infof(format string, args ...interface{}) Debugf(format string, args ...interface{}) Write(p []byte) (n int, err error) Close() error SetMinLevel(level int) MinLevel() int }
func New ¶
param: - LogTypeNull, LogTypeStdout, LogTypeStdoutColor: ignore - LogTypeSyslog: tag - LogTypeFile: fileName
func NewStdoutColor ¶
Click to show internal directories.
Click to hide internal directories.