logger

package
v9.1.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package logger provides utility functions for logging purposes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

A Logger is used to log messages to stdout

func NewLogger

func NewLogger(writer io.Writer, debug bool, json bool, serverName string) (*Logger, error)

NewLogger creates a new logger

func (*Logger) Debug

func (l *Logger) Debug(args ...interface{})

Debug logs a line as debug

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{})

Debugf logs a line as debug using format specifiers

func (*Logger) Error

func (l *Logger) Error(args ...interface{})

Errorf logs a message as error

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

Errorf logs a message as error using format specifiers

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, args ...interface{})

Fatalf logs a message as fatal using format specifiers TODO: Remove this

func (*Logger) Print

func (l *Logger) Print(args ...interface{})

Print logs a message as info

func (*Logger) PrintString

func (l *Logger) PrintString(msg string)

PrintString logs a string as info

func (*Logger) Printf

func (l *Logger) Printf(format string, args ...interface{})

Printf logs a message as info using format specifiers

func (*Logger) Println

func (l *Logger) Println(args ...interface{})

Println logs a message

Jump to

Keyboard shortcuts

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