Documentation ¶
Index ¶
- func CloseLogFile() error
- func InitLogFile() error
- func NewContext(ctx context.Context, logger *Logger) context.Context
- type Level
- type Logger
- func (l *Logger) AndLogToFile() *Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Level() Level
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
- type SplitLogger
- type WriterLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseLogFile ¶ added in v0.1.51
func CloseLogFile() error
func InitLogFile ¶ added in v0.1.51
func InitLogFile() error
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func FromContext ¶
FromContext returns the Logger ctx carries. It panics in case ctx carries no Logger.
func MaybeFromContext ¶ added in v0.0.287
func (*Logger) AndLogToFile ¶ added in v0.1.51
type SplitLogger ¶ added in v0.1.51
type SplitLogger struct {
// contains filtered or unexported fields
}
func (*SplitLogger) Level ¶ added in v0.1.51
func (l *SplitLogger) Level() Level
func (*SplitLogger) UseAnsi ¶ added in v0.1.51
func (l *SplitLogger) UseAnsi() bool
func (*SplitLogger) WriteLog ¶ added in v0.1.51
func (l *SplitLogger) WriteLog(level Level, line string)
type WriterLogger ¶ added in v0.1.51
type WriterLogger struct {
// contains filtered or unexported fields
}
func (*WriterLogger) Level ¶ added in v0.1.51
func (l *WriterLogger) Level() Level
func (*WriterLogger) UseAnsi ¶ added in v0.1.51
func (l *WriterLogger) UseAnsi() bool
func (*WriterLogger) WriteLog ¶ added in v0.1.51
func (l *WriterLogger) WriteLog(level Level, line string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.