Documentation ¶
Overview ¶
Package common contains common properties used by the subpackages.
Index ¶
- Constants
- Variables
- func SetLogger(logger Logger)
- func UtcTimeFormat(t time.Time) string
- type ConsoleLogger
- func (this ConsoleLogger) Debug(format string, args ...interface{})
- func (this ConsoleLogger) Error(format string, args ...interface{})
- func (this ConsoleLogger) Info(format string, args ...interface{})
- func (this ConsoleLogger) Notice(format string, args ...interface{})
- func (this ConsoleLogger) Trace(format string, args ...interface{})
- func (this ConsoleLogger) Warning(format string, args ...interface{})
- type DummyLogger
- func (this DummyLogger) Debug(format string, args ...interface{})
- func (this DummyLogger) Error(format string, args ...interface{})
- func (this DummyLogger) Info(format string, args ...interface{})
- func (this DummyLogger) Notice(format string, args ...interface{})
- func (this DummyLogger) Trace(format string, args ...interface{})
- func (this DummyLogger) Warning(format string, args ...interface{})
- type LogLevel
- type Logger
Constants ¶
View Source
const Version = "2.0.1"
Holds version information, when bumping this make sure to bump the released at stamp also.
Variables ¶
View Source
var ReleasedAt = time.Date(releaseYear, releaseMonth, releaseDay, releaseHour, releaseMin, 0, 0, time.UTC)
Functions ¶
func UtcTimeFormat ¶
Types ¶
type ConsoleLogger ¶
type ConsoleLogger struct {
LogLevel LogLevel
}
func NewConsoleLogger ¶
func NewConsoleLogger(logLevel LogLevel) *ConsoleLogger
func (ConsoleLogger) Debug ¶
func (this ConsoleLogger) Debug(format string, args ...interface{})
func (ConsoleLogger) Error ¶
func (this ConsoleLogger) Error(format string, args ...interface{})
func (ConsoleLogger) Info ¶
func (this ConsoleLogger) Info(format string, args ...interface{})
func (ConsoleLogger) Notice ¶
func (this ConsoleLogger) Notice(format string, args ...interface{})
func (ConsoleLogger) Trace ¶
func (this ConsoleLogger) Trace(format string, args ...interface{})
func (ConsoleLogger) Warning ¶
func (this ConsoleLogger) Warning(format string, args ...interface{})
type DummyLogger ¶
type DummyLogger struct{}
Dummy Logger does nothing.
func (DummyLogger) Debug ¶
func (this DummyLogger) Debug(format string, args ...interface{})
func (DummyLogger) Error ¶
func (this DummyLogger) Error(format string, args ...interface{})
func (DummyLogger) Info ¶
func (this DummyLogger) Info(format string, args ...interface{})
func (DummyLogger) Notice ¶
func (this DummyLogger) Notice(format string, args ...interface{})
func (DummyLogger) Trace ¶
func (this DummyLogger) Trace(format string, args ...interface{})
func (DummyLogger) Warning ¶
func (this DummyLogger) Warning(format string, args ...interface{})
type Logger ¶
type Logger interface { Error(format string, args ...interface{}) Warning(format string, args ...interface{}) Notice(format string, args ...interface{}) Info(format string, args ...interface{}) Debug(format string, args ...interface{}) Trace(format string, args ...interface{}) }
var Log Logger = DummyLogger{}
Click to show internal directories.
Click to hide internal directories.