logger

package
v0.0.0-...-4310ded Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscardLogger

type DiscardLogger struct{}

Silent logger, produces no output

func (*DiscardLogger) Print

func (logger *DiscardLogger) Print(sessionId string, message interface{})

func (*DiscardLogger) PrintCommand

func (logger *DiscardLogger) PrintCommand(sessionId string, command string, params string)

func (*DiscardLogger) PrintResponse

func (logger *DiscardLogger) PrintResponse(sessionId string, code int, message string)

func (*DiscardLogger) Printf

func (logger *DiscardLogger) Printf(sessionId string, format string, v ...interface{})

type Logger

type Logger interface {
	Print(sessionId string, message interface{})
	Printf(sessionId string, format string, v ...interface{})
	PrintCommand(sessionId string, command string, params string)
	PrintResponse(sessionId string, code int, message string)
}

type StdLogger

type StdLogger struct{}

Use an instance of this to log in a standard format

func (*StdLogger) Print

func (logger *StdLogger) Print(sessionId string, message interface{})

func (*StdLogger) PrintCommand

func (logger *StdLogger) PrintCommand(sessionId string, command string, params string)

func (*StdLogger) PrintResponse

func (logger *StdLogger) PrintResponse(sessionId string, code int, message string)

func (*StdLogger) Printf

func (logger *StdLogger) Printf(sessionId string, format string, v ...interface{})

Jump to

Keyboard shortcuts

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