logger

package
v0.0.0-...-c5aa536 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*log.Logger
}

Logger wraps charm/log for structured logging

func Discard

func Discard() *Logger

Discard returns a logger that discards all output

func New

func New(w io.Writer) *Logger

New creates a new logger with the given output

func NewFileLogger

func NewFileLogger(path string) (*Logger, func(), error)

NewFileLogger creates a logger that writes to a file

func NewMultiLogger

func NewMultiLogger(writers ...io.Writer) *Logger

NewMultiLogger creates a logger that writes to multiple outputs

func NewWithLevel

func NewWithLevel(w io.Writer, level log.Level) *Logger

NewWithLevel creates a logger with a specific level

func (*Logger) ConfigLoaded

func (l *Logger) ConfigLoaded(orgDir, obsidianDir string, interval time.Duration)

ConfigLoaded logs successful config loading

func (*Logger) Conflict

func (l *Logger) Conflict(file, winner, reason string)

Conflict logs a conflict resolution

func (*Logger) ConversionError

func (l *Logger) ConversionError(source, dest string, err error)

ConversionError logs a conversion error

func (*Logger) FileError

func (l *Logger) FileError(file string, err error)

FileError logs an error for a specific file

func (*Logger) FileSynced

func (l *Logger) FileSynced(source, dest, reason string)

FileSynced logs a successful file sync

func (*Logger) Skipped

func (l *Logger) Skipped(file, reason string)

Skipped logs when a file is skipped

func (*Logger) StateError

func (l *Logger) StateError(operation string, err error)

StateError logs a state-related error

func (*Logger) SyncCompleted

func (l *Logger) SyncCompleted(filesProcessed int, errors int, duration time.Duration)

SyncCompleted logs the completion of a sync operation

func (*Logger) SyncStarted

func (l *Logger) SyncStarted(orgDir, obsidianDir string)

SyncStarted logs the start of a sync operation

Jump to

Keyboard shortcuts

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