logger

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

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

Errorf logs an error message with formatting.

func FlushAndClose added in v1.1.0

func FlushAndClose()

FlushAndClose flushes write buffers and closes all open log file handles. Call this once at program exit to ensure all data is written to disk.

func Init added in v1.1.0

func Init(level, format string)

Init configures the global logrus instance and redirects the stdlib log package through it. Call once at program startup before any logging occurs.

  • level: "debug", "info", "warn", "error" (default "info" for unknown values)
  • format: "json" for structured JSON output; anything else uses text format

func LogFailure

func LogFailure(email string, subject string)

LogFailure logs a permanent failure to stdout and appends to failed.csv.

func LogSuccess

func LogSuccess(email string, subject string)

LogSuccess logs a successful send to stdout and appends to success.csv.

func New added in v1.0.0

func New(name string) interface {
	Infof(string, ...any)
	Warnf(string, ...any)
	Errorf(string, ...any)
}

Logger returns a minimal logger compatible with the scheduler's Logger interface. The name is used as a structured "component" field on every log entry.

func Warnf

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

Warnf logs a warning message with formatting.

Types

This section is empty.

Jump to

Keyboard shortcuts

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