logs

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const LOG_DIR_PERM = 0750
View Source
const LOG_FILE_NAME = "corn.jsonl"
View Source
const LOG_FILE_PERM = 0640

Variables

This section is empty.

Functions

This section is empty.

Types

type InternalLogger

type InternalLogger = zerolog.Logger

type Logger

type Logger struct {
	L InternalLogger

	LogsDir string
	IsDev   bool
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(logBaseDir string, isDev bool) (*Logger, error)

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) NewJobLogger

func (l *Logger) NewJobLogger(jobName string) (zerolog.Logger, func() error, error)

creates a logger for a job, returns the logger, close function and error the close function should be used (probably deferred) to close the job file stream IMPORTANT: the close function might be null if there is an error

Jump to

Keyboard shortcuts

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