Documentation ¶
Overview ¶
Package tlog is a "toggled logger" that can be enabled and disabled and provides coloring.
Index ¶
Constants ¶
const (
// ProgramName is used in log reports.
ProgramName = "gocryptfs"
)
Variables ¶
var ( // ColorReset is used to reset terminal colors. ColorReset string // ColorGrey is a terminal color setting string. ColorGrey string // ColorRed is a terminal color setting string. ColorRed string // ColorGreen is a terminal color setting string. ColorGreen string // ColorYellow is a terminal color setting string. ColorYellow string )
Escape sequences for terminal colors. These are set in init() if and only if stdout is a terminal. Otherwise they are empty strings.
var Debug *toggledLogger
Debug logs debug messages Can be enabled by passing "-d"
var Fatal *toggledLogger
Fatal error, we are about to exit
var Info *toggledLogger
Info logs informational message Can be disabled by passing "-q"
var Warn *toggledLogger
Warn logs warnings, meaning nothing serious by itself but might indicate problems. Passing "-wpanic" will make this function panic after printing the message.
Functions ¶
func PrintMasterkeyReminder ¶ added in v1.6.1
func PrintMasterkeyReminder(key []byte)
PrintMasterkeyReminder reminds the user that he should store the master key in a safe place.
func SwitchLoggerToSyslog ¶
SwitchLoggerToSyslog redirects the default log.Logger that the go-fuse lib uses to syslog.
Types ¶
This section is empty.