logger

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package logger provides logging functions. As default, logger discards all passed messages. See SetOutput for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Printf

func Printf(format string, v ...interface{})

Printf provides fmt.Printf like logging.

func Println

func Println(v ...interface{})

Println provides fmt.Println like logging.

func Reset added in v0.7.2

func Reset()

Reset resets all logging parameters.

func Scriptf added in v0.7.3

func Scriptf(format string, f func() []interface{})

Scriptf is similar with Scriptln, but for formatting output.

func Scriptln added in v0.7.2

func Scriptln(f func() []interface{})

Scriptln receives a function f which executes something and returns some values as a slice of empty interfaces. If logging is disabled, f is not executed.

func SetOutput

func SetOutput(w io.Writer)

SetOutput enables logging that writes out logs to w. Note that SetOutput works only once. To perform SetOutput again, it is necessary to call Reset before it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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