log

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(ctx context.Context, msg string, args ...any)

Error logs an error-level message

func Errorf

func Errorf(ctx context.Context, format string, args ...interface{})

Errorf logs an error-level message with format string and arguments

func Info

func Info(ctx context.Context, msg string, args ...any)

Info logs an info-level message

func Infof

func Infof(ctx context.Context, format string, args ...interface{})

Infof logs an info-level message with format string and arguments

func Init

func Init() error

Init initializes the info and error loggers with separate files

func JSON

func JSON(v interface{}) interface{}

func SetErrorOutput

func SetErrorOutput(w io.Writer)

SetErrorOutput sets a custom writer for error logs (useful for testing)

func SetInfoOutput

func SetInfoOutput(w io.Writer)

SetInfoOutput sets a custom writer for info logs (useful for testing)

Types

type JSONValue

type JSONValue struct {
	Value interface{}
}

func (JSONValue) String

func (c JSONValue) String() string

Jump to

Keyboard shortcuts

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