Documentation ¶
Index ¶
- type FileLogger
- func (l *FileLogger) ClearAllLogFile() error
- func (l *FileLogger) ClearCurLogFile() error
- func (l *FileLogger) Close() error
- func (l *FileLogger) GetCurrentLogFile() string
- func (l *FileLogger) GetPrevLogFile() string
- func (l *FileLogger) ReadLog(offset int64, length int64) (string, error)
- func (l *FileLogger) ReadTailLog(offset int64, length int64) (string, int64, bool, error)
- func (l *FileLogger) SetPid(pid int)
- func (l *FileLogger) Write(p []byte) (int, error)
- type LogCaptureLogger
- func (l *LogCaptureLogger) ClearAllLogFile() error
- func (l *LogCaptureLogger) ClearCurLogFile() error
- func (l *LogCaptureLogger) Close() error
- func (l *LogCaptureLogger) ReadLog(offset int64, length int64) (string, error)
- func (l *LogCaptureLogger) ReadTailLog(offset int64, length int64) (string, int64, bool, error)
- func (l *LogCaptureLogger) SetPid(pid int)
- func (l *LogCaptureLogger) Write(p []byte) (int, error)
- type LogEventEmitter
- type Logger
- type NullLocker
- type NullLogEventEmitter
- type NullLogger
- func (l *NullLogger) ClearAllLogFile() error
- func (l *NullLogger) ClearCurLogFile() error
- func (l *NullLogger) Close() error
- func (l *NullLogger) ReadLog(offset int64, length int64) (string, error)
- func (l *NullLogger) ReadTailLog(offset int64, length int64) (string, int64, bool, error)
- func (l *NullLogger) SetPid(pid int)
- func (l *NullLogger) Write(p []byte) (int, error)
- type StdLogEventEmitter
- type StdLogger
- type SysLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
func NewFileLogger ¶
func NewFileLogger(name string, maxSize int64, backups int, logEventEmitter LogEventEmitter, locker sync.Locker) *FileLogger
func (*FileLogger) ClearAllLogFile ¶
func (l *FileLogger) ClearAllLogFile() error
func (*FileLogger) ClearCurLogFile ¶
func (l *FileLogger) ClearCurLogFile() error
clear the current log file contents
func (*FileLogger) Close ¶
func (l *FileLogger) Close() error
func (*FileLogger) GetCurrentLogFile ¶
func (l *FileLogger) GetCurrentLogFile() string
get the name of current log file
func (*FileLogger) GetPrevLogFile ¶
func (l *FileLogger) GetPrevLogFile() string
get the name of previous log file
func (*FileLogger) ReadLog ¶
func (l *FileLogger) ReadLog(offset int64, length int64) (string, error)
func (*FileLogger) ReadTailLog ¶
func (*FileLogger) SetPid ¶
func (l *FileLogger) SetPid(pid int)
type LogCaptureLogger ¶
type LogCaptureLogger struct {
// contains filtered or unexported fields
}
func NewLogCaptureLogger ¶
func (*LogCaptureLogger) ClearAllLogFile ¶
func (l *LogCaptureLogger) ClearAllLogFile() error
func (*LogCaptureLogger) ClearCurLogFile ¶
func (l *LogCaptureLogger) ClearCurLogFile() error
func (*LogCaptureLogger) Close ¶
func (l *LogCaptureLogger) Close() error
func (*LogCaptureLogger) ReadLog ¶
func (l *LogCaptureLogger) ReadLog(offset int64, length int64) (string, error)
func (*LogCaptureLogger) ReadTailLog ¶
func (*LogCaptureLogger) SetPid ¶
func (l *LogCaptureLogger) SetPid(pid int)
type LogEventEmitter ¶
type LogEventEmitter interface {
// contains filtered or unexported methods
}
type NullLocker ¶
type NullLocker struct { }
func NewNullLocker ¶
func NewNullLocker() *NullLocker
func (*NullLocker) Lock ¶
func (l *NullLocker) Lock()
func (*NullLocker) Unlock ¶
func (l *NullLocker) Unlock()
type NullLogEventEmitter ¶
type NullLogEventEmitter struct { }
func NewNullLogEventEmitter ¶
func NewNullLogEventEmitter() *NullLogEventEmitter
type NullLogger ¶
type NullLogger struct {
// contains filtered or unexported fields
}
func NewNullLogger ¶
func NewNullLogger(logEventEmitter LogEventEmitter) *NullLogger
func (*NullLogger) ClearAllLogFile ¶
func (l *NullLogger) ClearAllLogFile() error
func (*NullLogger) ClearCurLogFile ¶
func (l *NullLogger) ClearCurLogFile() error
func (*NullLogger) Close ¶
func (l *NullLogger) Close() error
func (*NullLogger) ReadLog ¶
func (l *NullLogger) ReadLog(offset int64, length int64) (string, error)
func (*NullLogger) ReadTailLog ¶
func (*NullLogger) SetPid ¶
func (l *NullLogger) SetPid(pid int)
type StdLogEventEmitter ¶
type StdLogEventEmitter struct { Type string // contains filtered or unexported fields }
func NewStderrLogEventEmitter ¶
func NewStderrLogEventEmitter(process_name string, group_name string, procPidFunc func() int) *StdLogEventEmitter
func NewStdoutLogEventEmitter ¶
func NewStdoutLogEventEmitter(process_name string, group_name string, procPidFunc func() int) *StdLogEventEmitter
type StdLogger ¶
type StdLogger struct { NullLogger // contains filtered or unexported fields }
func NewStderrLogger ¶
func NewStderrLogger(logEventEmitter LogEventEmitter) *StdLogger
func NewStdoutLogger ¶
func NewStdoutLogger(logEventEmitter LogEventEmitter) *StdLogger
type SysLogger ¶
type SysLogger struct { NullLogger // contains filtered or unexported fields }
func NewSysLogger ¶
func NewSysLogger(name string, logEventEmitter LogEventEmitter) *SysLogger
Click to show internal directories.
Click to hide internal directories.