eclog

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	// Debug writes debug messages
	Debug(format string, v ...interface{})

	// Info writes info messages
	Info(format string, v ...interface{})

	// Error writes warning messages
	Warn(format string, v ...interface{})

	// Error writes error messages
	Error(format string, v ...interface{})
}

Logger defines the the basic implementation that meets the SDK's logging needs

func NewFileLogger

func NewFileLogger(filePath string) Logger

Creates a logger that writes to a single log file

func NewNullLogger

func NewNullLogger() Logger

Creates a logger that does nothing with messages

func NewStandardLogger

func NewStandardLogger() Logger

Creates a logger that writes to the standard output and error streams

type NullLogger

type NullLogger struct{}

A logger that will do nothing with messages

func (NullLogger) Debug

func (l NullLogger) Debug(format string, v ...interface{})

Debug does nothing

func (NullLogger) Error

func (l NullLogger) Error(format string, v ...interface{})

Error does nothing

func (NullLogger) Info

func (l NullLogger) Info(format string, v ...interface{})

Info does nothing

func (NullLogger) Warn

func (l NullLogger) Warn(format string, v ...interface{})

Warn does nothing

type SimpleLogger

type SimpleLogger struct {
	InfoLogger    *log.Logger
	DebugLogger   *log.Logger
	ErrorLogger   *log.Logger
	WarningLogger *log.Logger
}

A basic implementation of Logger using log.Logger internally

func (SimpleLogger) Debug

func (l SimpleLogger) Debug(format string, v ...interface{})

Debug writes Debug messages to stdout

func (SimpleLogger) Error

func (l SimpleLogger) Error(format string, v ...interface{})

Error writes to error messages to stderr

func (SimpleLogger) Info

func (l SimpleLogger) Info(format string, v ...interface{})

Info writes Info messages to stdout

func (SimpleLogger) Warn

func (l SimpleLogger) Warn(format string, v ...interface{})

Warn writes to error messages to stderr

Jump to

Keyboard shortcuts

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