logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CurrentLogDirectory string

	Log *LogType
)

Functions

func CloseLogger

func CloseLogger(file *os.File)

func CreateOutputDir

func CreateOutputDir(directoryName string, commandName string) string

func Fatal

func Fatal(v ...any)

func Fatalf

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

func Fatalln

func Fatalln(v ...any)

func Fprint

func Fprint(w io.Writer, v ...any) (n int, err error)

func Fprintf

func Fprintf(w io.Writer, format string, v ...any) (n int, err error)

func Fprintln

func Fprintln(w io.Writer, v ...any) (n int, err error)

func NewLogger

func NewLogger(logFileName string)

func NewLoggerDateTime

func NewLoggerDateTime(logFileName string)

func NewLoggerDateTimeFile

func NewLoggerDateTimeFile(logFileName string)

func NewLoggerNull

func NewLoggerNull()

func NewLoggerStdout

func NewLoggerStdout()

New logger for commands that do not need to create a complete directory structure

func NewLoggerStdoutDateTime

func NewLoggerStdoutDateTime()

func NewLoggerStdoutDateTimeFile

func NewLoggerStdoutDateTimeFile()

func Panicln

func Panicln(v ...any)

func Print

func Print(v ...any)

func Printf

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

func Println

func Println(v ...any)

func Writer

func Writer() io.Writer

Types

type LogType

type LogType log.Logger

func New

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

Jump to

Keyboard shortcuts

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