plog

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package plog provides diagnostic output functions according to the Go standard logger "log" where log messages are prefixed by the invoker's package name and log output can be enabled/disabled programmatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disable

func Disable()

Disable disables log output.

func Enable

func Enable()

Enable enables log output.

func Enabled

func Enabled() bool

Enabled checks whether log output is currently enabled.

func Fatal

func Fatal(v ...any)

Fatal is equivalent to log.Fatal. In addition, the message is prefixed with the invoker's package name. Output is never discarded even if logging is disabled.

func Fatalf

func Fatalf(format string, v ...any)

Fatalf is equivalent to log.Fatalf. In addition, the message is prefixed with the invoker's package name. Output is never discarded even if logging is disabled.

func Fatalln

func Fatalln(v ...any)

Fatalln is equivalent to log.Fatalln. In addition, the message is prefixed with the invoker's package name. Output is never discarded even if logging is disabled.

func Print

func Print(v ...any)

Print is equivalent to log.Print. In addition, the message is prefixed with the invoker's package name. Output is discarded if logging is disabled.

func Printf

func Printf(format string, v ...any)

Printf is equivalent to log.Printf. In addition, the message is prefixed with the invoker's package name. Output is discarded if logging is disabled.

func Println

func Println(v ...any)

Println is equivalent to log.Println. In addition, the message is prefixed with the invoker's package name. Output is discarded if logging is disabled.

func WithPrefix

func WithPrefix(prefix string) *log.Logger

WithPrefix creates a *log.Logger with the given message prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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