logging

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONLogger

type JSONLogger struct {
	Filepath string
	// contains filtered or unexported fields
}

JSONLogger outputs logs in JSON format.

func NewJSONLogger

func NewJSONLogger() JSONLogger

NewJSONLogger creates a new instance of JSONLogger.

func (*JSONLogger) Info

func (l *JSONLogger) Info(args ...interface{})

Info logs standard info messages.

func (*JSONLogger) Infof

func (l *JSONLogger) Infof(format string, args ...interface{})

Infof logs formatted info messages.

func (*JSONLogger) SetFile

func (l *JSONLogger) SetFile(dir string, filename string) error

SetFile will create or open a write-only file for the JSONLogger to output to.

type Logger

type Logger interface {
	Info(args ...interface{})
	Infof(format string, args ...interface{})
}

Logger maintains log methods currently supports Info, Infof.

Jump to

Keyboard shortcuts

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