rclone: github.com/rclone/rclone/fs/log Index | Files

package log

import "github.com/rclone/rclone/fs/log"

Package log provides logging for rclone


Package Files

caller_hook.go log.go redirect_stderr_unix.go syslog_unix.go

func InitLogging Uses

func InitLogging()

InitLogging start the logging as per the command line flags

func NewCallerHook Uses

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

NewCallerHook use to make an hook

func Redirected Uses

func Redirected() bool

Redirected returns true if the log has been redirected from stdout

func Stack Uses

func Stack(o interface{}, info string)

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

func Trace Uses

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

type CallerHook Uses

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 Uses

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

Fire logs the information of context (filename and line)

func (*CallerHook) Levels Uses

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

Levels implement applied hook to which levels

Package log imports 14 packages (graph) and is imported by 26 packages. Updated 2019-09-25. Refresh now. Tools for package owners.