logutil

package
v0.0.0-...-3ca17b7 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Err

func Err(err error) slog.Attr

Err returns an error attribute for logging

func OpenFile

func OpenFile(fileName string) *os.File

OpenFile opens or creates a log file in the user's cache directory and returns the file

WARNING: panics if the log file cannot be created

func Plug

func Plug() *slog.Logger

func Setup

func Setup(mode env.Mode) (*slog.Logger, func())

Setup creates a new logger based on the environment

WARNING: panics if any errors occur during setup

REMINDER: don't forget to call the cleanup function to close the log file

Types

This section is empty.

Jump to

Keyboard shortcuts

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