Documentation
¶
Index ¶
- func Critical(format string, values ...interface{})
- func Debug(format string, values ...interface{})
- func Fatalf(format string, values ...interface{})
- func Info(format string, values ...interface{})
- func Initialize()
- func IsDebug() bool
- func Notice(format string, values ...interface{})
- func RemovalRoutine()
- func SetLevel(lvl Level)
- func UseDatabaseLogger(db *sql.DB)
- func Warning(format string, values ...interface{})
- type BaseLogger
- type DatabaseLogger
- type Level
- type Logger
- type TestLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Critical ¶
func Critical(format string, values ...interface{})
Critical prints error informations
func Fatalf ¶
func Fatalf(format string, values ...interface{})
Fatalf prints fatal informations, then os.Exit(1)
func Notice ¶
func Notice(format string, values ...interface{})
Notice prints information that should be seen
func RemovalRoutine ¶
func RemovalRoutine()
RemovalRoutine removes logs older than 1 day from database
func UseDatabaseLogger ¶
UseDatabaseLogger should be used only with proper database
Types ¶
type BaseLogger ¶
type BaseLogger struct {
}
BaseLogger logs on stdout
func (BaseLogger) Logf ¶
func (l BaseLogger) Logf(fmt string, values ...interface{})
Logf logs on stdout
type DatabaseLogger ¶
type DatabaseLogger struct {
// contains filtered or unexported fields
}
DatabaseLogger logs in database
func (DatabaseLogger) Logf ¶
func (l DatabaseLogger) Logf(format string, values ...interface{})
Logf insert log into "system_log" table
type Logger ¶
type Logger interface {
Logf(fmt string, values ...interface{})
}
Logger defines the logs levels used by RamSQL engine
type TestLogger ¶
type TestLogger struct {
// contains filtered or unexported fields
}
TestLogger uses *testing.T as a backend for RamSQL logs
func (TestLogger) Logf ¶
func (l TestLogger) Logf(fmt string, values ...interface{})
Logf logs in testing log buffer
Click to show internal directories.
Click to hide internal directories.