logutil

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package logutil provides logging utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(prefix string) *log.Logger

GetLogger gets a logger with a prefix.

func SetOutput

func SetOutput(newout io.Writer)

SetOutput redirects the output of all loggers obtained with GetLogger to the new io.Writer. If the old output was a file opened by SetOutputFile, it is closed.

func SetOutputFile

func SetOutputFile(fname string) error

SetOutputFile redirects the output of all loggers obtained with GetLogger to the named file. If the old output was a file opened by SetOutputFile, it is closed. The new file is truncated. SetOutFile("") is equivalent to SetOutput(ioutil.Discard).

Types

This section is empty.

Jump to

Keyboard shortcuts

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