Documentation ¶
Index ¶
- Constants
- func App(root *config.Area, configdir string)
- type AppShutdownEvent
- type AppStartupEvent
- type LogKey
- type Logger
- type NullLogger
- func (NullLogger) Debug(args ...interface{})
- func (NullLogger) Debugf(log string, args ...interface{})
- func (NullLogger) Error(args ...interface{})
- func (NullLogger) Fatal(args ...interface{})
- func (n NullLogger) Flush()
- func (NullLogger) Info(args ...interface{})
- func (NullLogger) Panic(args ...interface{})
- func (NullLogger) Warn(args ...interface{})
- func (n NullLogger) WithContext(ctx context.Context) Logger
- func (n NullLogger) WithField(key LogKey, value interface{}) Logger
- func (n NullLogger) WithFields(fields map[LogKey]interface{}) Logger
- type StdLogger
- func (l *StdLogger) Debug(args ...interface{})
- func (l *StdLogger) Debugf(f string, args ...interface{})
- func (l *StdLogger) Error(args ...interface{})
- func (l *StdLogger) Flush()
- func (l *StdLogger) Info(args ...interface{})
- func (l *StdLogger) Warn(args ...interface{})
- func (l *StdLogger) WithContext(ctx context.Context) Logger
- func (l *StdLogger) WithField(key LogKey, value interface{}) Logger
- func (l *StdLogger) WithFields(fields map[LogKey]interface{}) Logger
Constants ¶
View Source
const ( LogKeyAccesslog LogKey = "accesslog" // LogKeyAccesslog marks a logmessage belonging to an (incoming) call (value should be 1) LogKeyApicall = "apicall" // LogKeyApicall marks a logmessage belonging to an (outgoing) api call (value should be 1) LogKeyArea = "area" LogKeyBusinessID = "businessId" LogKeyCategory = "category" LogKeySubCategory = "sub_category" LogKeyClientIP = "client_ip" LogKeyCode = "code" LogKeyConnectionStatus = "connection_status" LogKeyCorrelationID = "correlationId" LogKeyLevel = "level" LogKeyMessage = "message" LogKeyMethod = "method" LogKeyPath = "path" LogKeyReferer = "referer" LogKeyRequest = "request" LogKeyRequestTime = "request_time" LogKeyRequestedEndpoint = "requested_endpoint" LogKeyRequestedURL = "requested_url" LogKeyResponse = "response" LogKeyResponseCode = "response_code" LogKeyResponseTime = "response_time" LogKeySource = "source" LogKeyTimestamp = "@timestamp" LogKeyTrace = "trace" )
Common logger field keys
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppShutdownEvent ¶
AppShutdownEvent is dispatched on app shutdown
type AppStartupEvent ¶
AppShutdownEvent is dispatched on app startup
type Logger ¶
type Logger interface { WithContext(ctx context.Context) Logger Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Panic(args ...interface{}) Debugf(log string, args ...interface{}) WithField(key LogKey, value interface{}) Logger WithFields(fields map[LogKey]interface{}) Logger Flush() }
Logger defines a standard Flamingo logger interfaces
type NullLogger ¶
type NullLogger struct{}
NullLogger does not log
func (NullLogger) Debugf ¶
func (NullLogger) Debugf(log string, args ...interface{})
Debugf null-implementation
func (NullLogger) WithContext ¶
func (n NullLogger) WithContext(ctx context.Context) Logger
WithContext null-implementation
func (NullLogger) WithField ¶
func (n NullLogger) WithField(key LogKey, value interface{}) Logger
WithField null-implementation
func (NullLogger) WithFields ¶
func (n NullLogger) WithFields(fields map[LogKey]interface{}) Logger
WithFields null-implementation
type StdLogger ¶
StdLogger uses the go stdlib logger for logging
func (*StdLogger) WithContext ¶
WithContext currently does nothing
func (*StdLogger) WithFields ¶
WithFields currently logs the fields
Click to show internal directories.
Click to hide internal directories.