log

package
v0.0.0-...-2533219 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Critical

func Critical(format string, values ...interface{})

Critical prints error informations

func Debug

func Debug(format string, values ...interface{})

Debug prints debug log

func Info

func Info(format string, values ...interface{})

Info prints information log

func Notice

func Notice(format string, values ...interface{})

Notice prints information that should be seen

func SetLevel

func SetLevel(lvl Level)

SetLevel controls the categories of logs written

func UseTestLogger

func UseTestLogger(t testing.TB)

UseTestLogger should be used only by unit tests

func Warning

func Warning(format string, values ...interface{})

Warning prints warnings for user

Types

type BaseLogger

type BaseLogger struct {
}

BaseLogger logs on stdout

func (BaseLogger) Logf

func (l BaseLogger) Logf(fmt string, values ...interface{})

Logf logs on stdout

type Level

type Level int

Level of logging trigger

const (
	DebugLevel Level = iota
	InfoLevel
	NoticeLevel
	WarningLevel
	CriticalLevel
)

Available logging levels

type Logger

type Logger interface {
	Logf(fmt string, values ...interface{})
}

Logger defines the logs levels used by RamSQL engine

type TestLogger

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

TestLogger uses *testing.T as a backend for RamSQL logs

func (TestLogger) Logf

func (l TestLogger) Logf(fmt string, values ...interface{})

Logf logs in testing log buffer

Jump to

Keyboard shortcuts

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