log

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package log defines the logger interface used in rsync library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Printf

func Printf(msg string, a ...interface{})

Printf logs message to the default logger.

func SetLogger

func SetLogger(logger Logger)

SetLogger overrides the default logger to use in rsync. This should be call from the very beggining of the program.

Types

type Logger

type Logger interface {
	// Printf logs message to the underlying log output. Arguments are handled in the manner of fmt.Printf.
	Printf(msg string, a ...interface{})
}

Logger is an interface that allows specifying your own logger. By default, the Go log package is used, which prints to stderr.

func Default

func Default() Logger

Default returns the global logger instance.

Jump to

Keyboard shortcuts

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