slog

package module
v0.0.0-...-e6f2d53 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 0 Imported by: 6

README

slog

The standard logging interface.

Documentation

Overview

slog defines a common interface for loggers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	// Fatal logs a fatal log and then exits the program.
	// Arguments are handled in the manner of fmt.Print.
	Fatal(args ...interface{})

	// Fatalf logs a fatal log and then exits the program.
	// Arguments are handled in the manner of fmt.Printf.
	Fatalf(format string, args ...interface{})

	// Error logs error logs.
	// Arguments are handled in the manner of fmt.Print.
	Error(args ...interface{})

	// Errorf logs error logs.
	// Arguments are handled in the manner of fmt.Printf.
	Errorf(format string, args ...interface{})

	// Warning logs warning logs.
	// Arguments are handled in the manner of fmt.Print.
	Warning(args ...interface{})

	// Warning logs warning logs.
	// Arguments are handled in the manner of fmt.Printf.
	Warningf(format string, args ...interface{})

	// Info logs informational logs.
	// Arguments are handled in the manner of fmt.Print.
	Info(args ...interface{})

	// Infof logs informational logs.
	// Arguments are handled in the manner of fmt.Printf.
	Infof(format string, args ...interface{})

	// Debug logs debugging logs.
	// Arguments are handled in the manner of fmt.Print.
	Debug(args ...interface{})

	// Debugf logs debugging logs.
	// Arguments are handled in the manner of fmt.Printf.
	Debugf(format string, args ...interface{})

	// Raw sends the string s to the logs without any additional formatting.
	Raw(s string)
}

Logger is the interface that all loggers should conform to.

Jump to

Keyboard shortcuts

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