Documentation ¶
Index ¶
- Constants
- type DBLogger
- func (dbl *DBLogger) Close() error
- func (dbl *DBLogger) Debug(v ...interface{})
- func (dbl *DBLogger) Debugf(format string, v ...interface{})
- func (dbl *DBLogger) Error(v ...interface{})
- func (dbl *DBLogger) Errorf(format string, v ...interface{})
- func (dbl *DBLogger) Fatal(v ...interface{})
- func (dbl *DBLogger) Fatalf(format string, v ...interface{})
- func (dbl *DBLogger) Info(v ...interface{})
- func (dbl *DBLogger) Infof(format string, v ...interface{})
- func (dbl *DBLogger) Warning(v ...interface{})
- func (dbl *DBLogger) Warningf(format string, v ...interface{})
- type FileLogger
- func (fl *FileLogger) Close() error
- func (fl *FileLogger) Debug(v ...interface{})
- func (fl *FileLogger) Debugf(format string, v ...interface{})
- func (fl *FileLogger) Error(v ...interface{})
- func (fl *FileLogger) Errorf(format string, v ...interface{})
- func (fl *FileLogger) Fatal(v ...interface{})
- func (fl *FileLogger) Fatalf(format string, v ...interface{})
- func (fl *FileLogger) Info(v ...interface{})
- func (fl *FileLogger) Infof(format string, v ...interface{})
- func (fl *FileLogger) Warning(v ...interface{})
- func (fl *FileLogger) Warningf(format string, v ...interface{})
- type StdOutputLogger
- func (sl *StdOutputLogger) Debug(v ...interface{})
- func (sl *StdOutputLogger) Debugf(format string, v ...interface{})
- func (sl *StdOutputLogger) Error(v ...interface{})
- func (sl *StdOutputLogger) Errorf(format string, v ...interface{})
- func (sl *StdOutputLogger) Fatal(v ...interface{})
- func (sl *StdOutputLogger) Fatalf(format string, v ...interface{})
- func (sl *StdOutputLogger) Info(v ...interface{})
- func (sl *StdOutputLogger) Infof(format string, v ...interface{})
- func (sl *StdOutputLogger) Warning(v ...interface{})
- func (sl *StdOutputLogger) Warningf(format string, v ...interface{})
Constants ¶
const ( // StdOut represents os.Stdout StdOut = "std_out" // StdErr represents os.StdErr StdErr = "std_err" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBLogger ¶
type DBLogger struct {
// contains filtered or unexported fields
}
DBLogger is an implementation of logger.Interface. It outputs logs to PGSql.
func NewDBLogger ¶
NewDBLogger crates a new DB logger nil might be returned
func (*DBLogger) Close ¶
Close the opened io stream and flush data into DB Implements logger.Closer interface
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
FileLogger is an implementation of logger.Interface. It outputs logs to the specified logfile.
func NewFileLogger ¶
func NewFileLogger(level string, logPath string, depth int) (*FileLogger, error)
NewFileLogger crates a new file logger nil might be returned
func (*FileLogger) Close ¶
func (fl *FileLogger) Close() error
Close the opened io stream Implements logger.Closer interface
func (*FileLogger) Debugf ¶
func (fl *FileLogger) Debugf(format string, v ...interface{})
Debugf with format
func (*FileLogger) Errorf ¶
func (fl *FileLogger) Errorf(format string, v ...interface{})
Errorf with format
func (*FileLogger) Fatalf ¶
func (fl *FileLogger) Fatalf(format string, v ...interface{})
Fatalf error
func (*FileLogger) Infof ¶
func (fl *FileLogger) Infof(format string, v ...interface{})
Infof with format
func (*FileLogger) Warningf ¶
func (fl *FileLogger) Warningf(format string, v ...interface{})
Warningf with format
type StdOutputLogger ¶
type StdOutputLogger struct {
// contains filtered or unexported fields
}
StdOutputLogger is an implementation of logger.Interface. It outputs the log to the stdout/stderr.
func NewStdOutputLogger ¶
func NewStdOutputLogger(level string, output string, depth int) *StdOutputLogger
NewStdOutputLogger creates a new std output logger
func (*StdOutputLogger) Debugf ¶
func (sl *StdOutputLogger) Debugf(format string, v ...interface{})
Debugf with format
func (*StdOutputLogger) Errorf ¶
func (sl *StdOutputLogger) Errorf(format string, v ...interface{})
Errorf with format
func (*StdOutputLogger) Fatalf ¶
func (sl *StdOutputLogger) Fatalf(format string, v ...interface{})
Fatalf error
func (*StdOutputLogger) Infof ¶
func (sl *StdOutputLogger) Infof(format string, v ...interface{})
Infof with format
func (*StdOutputLogger) Warningf ¶
func (sl *StdOutputLogger) Warningf(format string, v ...interface{})
Warningf with format