elvish: github.com/elves/elvish/pkg/logutil Index | Files

package logutil

import "github.com/elves/elvish/pkg/logutil"

Package logutil provides logging utilities.

Index

Package Files

logutil.go

func GetLogger Uses

func GetLogger(prefix string) *log.Logger

GetLogger gets a logger with a prefix.

func SetOutput Uses

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 Uses

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).

Package logutil imports 4 packages (graph) and is imported by 5 packages. Updated 2020-09-03. Refresh now. Tools for package owners.