logger

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger handles logging to both console and file

func New

func New(filename string) (*Logger, error)

New creates a new logger instance

func (*Logger) Close

func (l *Logger) Close() error

Close closes the log file

func (*Logger) Error

func (l *Logger) Error(message string, err error) error

Error logs an error message

func (*Logger) Fatal

func (l *Logger) Fatal(err error)

Fatal logs a fatal error message and exits the program

func (*Logger) Info

func (l *Logger) Info(message string) error

Info logs an informational message

Jump to

Keyboard shortcuts

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