import "github.com/rclone/rclone/fs/log"
Package log provides logging for rclone
caller_hook.go log.go redirect_stderr_unix.go syslog_unix.go systemd_unix.go
DefaultOpt is the default values used for Opt
var Opt = DefaultOpt
Opt is the options for the logger
func InitLogging()
InitLogging start the logging as per the command line flags
NewCallerHook use to make a hook
Redirected returns true if the log has been redirected from stdout
Stack logs a stack trace of callers with the o and info passed in
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
CallerHook for log the calling file and line of the fine
func (h *CallerHook) Fire(entry *logrus.Entry) error
Fire logs the information of context (filename and line)
func (h *CallerHook) Levels() []logrus.Level
Levels implement applied hook to which levels
type Options struct { File string // Log everything to this file Format string // Comma separated list of log format options UseSyslog bool // Use Syslog for logging SyslogFacility string // Facility for syslog, e.g. KERN,USER,... LogSystemdSupport bool // set if using systemd logging }
Options contains options for controlling the logging
Path | Synopsis |
---|---|
logflags | Package logflags implements command line flags to set up the log |
Package log imports 16 packages (graph) and is imported by 41 packages. Updated 2021-01-18. Refresh now. Tools for package owners.