Documentation ¶
Index ¶
- Constants
- Variables
- func ColorForMethod(method string) string
- func ColorForReset() string
- func ColorForStatus(code int) string
- func Debug(v ...interface{})
- func DebugF(format string, args ...interface{})
- func Error(v ...interface{})
- func ErrorF(format string, args ...interface{})
- func Info(v ...interface{})
- func InfoF(format string, args ...interface{})
- func Warn(v ...interface{})
- func WarnF(format string, args ...interface{})
- type ComLog
- func (cLog *ComLog) Debug(v ...interface{})
- func (cLog *ComLog) DebugF(format string, args ...interface{})
- func (cLog *ComLog) Error(v ...interface{})
- func (cLog *ComLog) ErrorF(format string, args ...interface{})
- func (cLog *ComLog) Info(v ...interface{})
- func (cLog *ComLog) InfoF(format string, args ...interface{})
- func (cLog *ComLog) Warn(v ...interface{})
- func (cLog *ComLog) WarnF(format string, args ...interface{})
- type DailyLog
- func (dLog *DailyLog) Debug(v ...interface{})
- func (dLog *DailyLog) DebugF(format string, args ...interface{})
- func (dLog *DailyLog) Error(v ...interface{})
- func (dLog *DailyLog) ErrorF(format string, args ...interface{})
- func (dLog *DailyLog) Info(v ...interface{})
- func (dLog *DailyLog) InfoF(format string, args ...interface{})
- func (dLog *DailyLog) Warn(v ...interface{})
- func (dLog *DailyLog) WarnF(format string, args ...interface{})
- type SizeLog
- func (slog *SizeLog) Debug(v ...interface{})
- func (slog *SizeLog) DebugF(format string, args ...interface{})
- func (slog *SizeLog) Error(v ...interface{})
- func (slog *SizeLog) ErrorF(format string, args ...interface{})
- func (slog *SizeLog) Info(v ...interface{})
- func (slog *SizeLog) InfoF(format string, args ...interface{})
- func (slog *SizeLog) Warn(v ...interface{})
- func (slog *SizeLog) WarnF(format string, args ...interface{})
Constants ¶
View Source
const ( LogLevelError = 1 << iota LogLevelWarn LogLevelInfo LogLevelDebug )
View Source
const PrefixHeadLen = 48
Variables ¶
View Source
var (
Reset = string([]byte{27, 91, 48, 109})
)
Functions ¶
func ColorForMethod ¶
func ColorForReset ¶
func ColorForReset() string
func ColorForStatus ¶
Types ¶
type ComLog ¶
type ComLog struct { LogLevel int LastRotateTime time.Time LogMaxSize int LogCurSize int FileFullName string PFile *os.File Log *log.Logger M sync.Mutex }
var GLog *ComLog
type DailyLog ¶
type DailyLog struct { LastCheckTime time.Time LogLevel int LogCurSize int FileFullName string PFile *os.File Log *log.Logger M sync.Mutex }
var GDailyLog *DailyLog
func InitDailyLog ¶
Click to show internal directories.
Click to hide internal directories.