Documentation ¶
Overview ¶
Package logging stores multiple mockable zap loggers for Xaro to use.
Index ¶
- type DebugLogger
- func (l *DebugLogger) Debug(msg string, iFields ...interface{})
- func (l *DebugLogger) Error(msg string, iFields ...interface{})
- func (l *DebugLogger) Fatal(msg string, iFields ...interface{})
- func (l *DebugLogger) Info(msg string, iFields ...interface{})
- func (l *DebugLogger) Warn(msg string, iFields ...interface{})
- type Logger
- type NilLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebugLogger ¶
type DebugLogger struct {
// contains filtered or unexported fields
}
DebugLogger is the default logger used for the Quirk client. This logger will not print anything out.
func NewDebugLogger ¶
func NewDebugLogger() *DebugLogger
NewDebugLogger returns a nil logging object for the Quirk client to use.
func (*DebugLogger) Debug ¶
func (l *DebugLogger) Debug(msg string, iFields ...interface{})
Debug logs nothing.
func (*DebugLogger) Error ¶
func (l *DebugLogger) Error(msg string, iFields ...interface{})
Error logs nothing.
func (*DebugLogger) Fatal ¶
func (l *DebugLogger) Fatal(msg string, iFields ...interface{})
Fatal logs nothing.
func (*DebugLogger) Info ¶
func (l *DebugLogger) Info(msg string, iFields ...interface{})
Info does nothing.
func (*DebugLogger) Warn ¶
func (l *DebugLogger) Warn(msg string, iFields ...interface{})
Warn does nothing.
type Logger ¶
type Logger interface { Info(msg string, fields ...interface{}) // Debug is used when confirming when things // are doing their jobs such as when adding // vertex labels to the schema. Debug(msg string, fields ...interface{}) Warn(msg string, fields ...interface{}) // Error is used when there is a problem but // not a big enough problem to stop an app. // These problems are minor, but not major. Error(msg string, fields ...interface{}) // Fatal's purpose is to stop the application // because something really wrong happened. // A case of this being used is when trying to // put an odd number of properties in an AddVertex // function. Which would not create a proper query // for the gremlin server and should stop. Fatal(msg string, fields ...interface{}) }
Logger is a wrapper for any kind of logger you wish to use. This can be customized and changed within the Quirk client itself.
type NilLogger ¶
type NilLogger struct{}
NilLogger is the default logger used for the Quirk client. This logger will not print anything out.
func NewNilLogger ¶
func NewNilLogger() *NilLogger
NewNilLogger returns a nil logging object for the Quirk client to use.