log

package
v1.50.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package log provides logging for rclone

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogging

func InitLogging()

InitLogging start the logging as per the command line flags

func NewCallerHook added in v1.6.1

func NewCallerHook(levels ...logrus.Level) logrus.Hook

NewCallerHook use to make an hook

func Redirected

func Redirected() bool

Redirected returns true if the log has been redirected from stdout

func Stack added in v1.6.1

func Stack(o interface{}, info string)

Stack logs a stack trace of callers with the o and info passed in

func Trace

func Trace(o interface{}, format string, a ...interface{}) func(string, ...interface{})

Trace debugs the entry and exit of the calling function

It is designed to be used in a defer statement so it returns a function that logs the exit parameters.

Any pointers in the exit function will be dereferenced

Types

type CallerHook added in v1.6.1

type CallerHook struct {
	Field string
	Skip  int
	// contains filtered or unexported fields
}

CallerHook for log the calling file and line of the fine

func (*CallerHook) Fire added in v1.6.1

func (h *CallerHook) Fire(entry *logrus.Entry) error

Fire logs the information of context (filename and line)

func (*CallerHook) Levels added in v1.6.1

func (h *CallerHook) Levels() []logrus.Level

Levels implement applied hook to which levels

Jump to

Keyboard shortcuts

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