logging

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(v ...any)

Fatal is equivalent to glob.Print() followed by a call to os.Exit(1).

func Fatalf

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

Fatalf is equivalent to glob.Printf() followed by a call to os.Exit(1).

func Fatalln

func Fatalln(v ...any)

Fatalln is equivalent to glob.Println() followed by a call to os.Exit(1).

func Flags

func Flags() int

Flags returns the output flags for the logger.

func Output

func Output(calldepth int, s string) error

Output writes the output for a logging event.

func Panic

func Panic(v ...any)

Panic is equivalent to glob.Print() followed by a call to panic().

func Panicf

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

Panicf is equivalent to glob.Printf() followed by a call to panic().

func Panicln

func Panicln(v ...any)

Panicln is equivalent to glob.Println() followed by a call to panic().

func Prefix

func Prefix() string

Prefix returns the output prefix for the logger.

func Print

func Print(v ...any)

Print calls l.Output to print to the logger. Arguments are handled in the manner of fmt.Print.

func Printf

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

Printf calls l.Output to print to the logger. Arguments are handled in the manner of fmt.Printf.

func Println

func Println(v ...any)

Println calls l.Output to print to the logger. Arguments are handled in the manner of fmt.Println.

func SetFlags

func SetFlags(flag int)

SetFlags sets the output flags for the logger.

func SetOutput

func SetOutput(w io.Writer)

SetOutput sets the output destination for the standard logger.

func SetPrefix

func SetPrefix(prefix string)

SetPrefix sets the output prefix for the logger.

func Writer

func Writer() io.Writer

Writer returns the output destination for the logger.

Types

type Logger

type Logger = log.Logger

func DefaultLogger

func DefaultLogger() *Logger

DefaultLogger returns the default logger used by the package-level functions.

func New

func New(out io.Writer, prefix string, flag int) *Logger

New creates a new Logger.

Jump to

Keyboard shortcuts

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