logging

package
v0.0.0-...-d471c43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package logging stores multiple mockable zap loggers for Xaro to use.

Index

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.

func (*NilLogger) Debug

func (*NilLogger) Debug(string, ...interface{})

Debug logs nothing.

func (*NilLogger) Error

func (*NilLogger) Error(string, ...interface{})

Error logs nothing.

func (*NilLogger) Fatal

func (*NilLogger) Fatal(string, ...interface{})

Fatal logs nothing.

func (*NilLogger) Info

func (*NilLogger) Info(string, ...interface{})

Info does nothing.

func (*NilLogger) Warn

func (*NilLogger) Warn(string, ...interface{})

Warn does nothing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL