Documentation ¶
Index ¶
- type BackendSysLogWriter
- type BackgroundWriteCloser
- type CompositeLogger
- func (cl *CompositeLogger) ClearAllLogFile() error
- func (cl *CompositeLogger) ClearCurLogFile() error
- func (cl *CompositeLogger) Close() (err error)
- func (cl *CompositeLogger) ReadLog(offset int64, length int64) (string, error)
- func (cl *CompositeLogger) ReadTailLog(offset int64, length int64) (string, int64, bool, error)
- func (cl *CompositeLogger) SetPid(pid int)
- func (cl *CompositeLogger) Write(p []byte) (n int, err error)
- type CustomFormatter
- type FileLogger
- func (l *FileLogger) ClearAllLogFile() error
- func (l *FileLogger) ClearCurLogFile() error
- func (l *FileLogger) Close() error
- 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 BackendSysLogWriter ¶
type BackendSysLogWriter struct {
// contains filtered or unexported fields
}
func NewBackendSysLogWriter ¶
func NewBackendSysLogWriter(network, raddr string, priority syslog.Priority, tag string) *BackendSysLogWriter
create a backgroud running syslog writer
func (*BackendSysLogWriter) Close ¶
func (bs *BackendSysLogWriter) Close() error
type BackgroundWriteCloser ¶
type BackgroundWriteCloser struct { io.WriteCloser // contains filtered or unexported fields }
func NewBackgroundWriteCloser ¶
func NewBackgroundWriteCloser(writeCloser io.WriteCloser) *BackgroundWriteCloser
func (*BackgroundWriteCloser) Close ¶
func (bw *BackgroundWriteCloser) Close() error
type CompositeLogger ¶
type CompositeLogger struct {
// contains filtered or unexported fields
}
func NewCompositeLogger ¶
func NewCompositeLogger(loggers []Logger) *CompositeLogger
func (*CompositeLogger) ClearAllLogFile ¶
func (cl *CompositeLogger) ClearAllLogFile() error
func (*CompositeLogger) ClearCurLogFile ¶
func (cl *CompositeLogger) ClearCurLogFile() error
func (*CompositeLogger) Close ¶
func (cl *CompositeLogger) Close() (err error)
func (*CompositeLogger) ReadLog ¶
func (cl *CompositeLogger) ReadLog(offset int64, length int64) (string, error)
func (*CompositeLogger) ReadTailLog ¶
func (*CompositeLogger) SetPid ¶
func (cl *CompositeLogger) SetPid(pid int)
type CustomFormatter ¶
type CustomFormatter logrus.TextFormatter
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, error)
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) 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 Logger ¶
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 NewRemoteSysLogger ¶
func NewRemoteSysLogger(name string, config string, logEventEmitter LogEventEmitter) *SysLogger
create a network syslog
func NewSysLogger ¶
func NewSysLogger(name string, logEventEmitter LogEventEmitter) *SysLogger
create a local syslog
Click to show internal directories.
Click to hide internal directories.