tlog

package
v0.0.0-...-ece74ff Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tlog is a "toggled logger" that can be enabled and disabled and provides coloring.

Index

Constants

View Source
const (
	// ProgramName is used in log reports.
	ProgramName = "gocryptfs"
)

Variables

View Source
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.

View Source
var Debug *toggledLogger

Debug logs debug messages Can be enabled by passing "-d"

View Source
var Fatal *toggledLogger

Fatal error, we are about to exit

View Source
var Info *toggledLogger

Info logs informational message Can be disabled by passing "-q"

View Source
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 JSONDump

func JSONDump(obj interface{}) string

JSONDump writes the object in json form.

func PrintMasterkeyReminder

func PrintMasterkeyReminder(key []byte)

PrintMasterkeyReminder reminds the user that he should store the master key in a safe place.

func SwitchLoggerToSyslog

func SwitchLoggerToSyslog()

SwitchLoggerToSyslog redirects the default log.Logger that the go-fuse lib uses to syslog.

Types

This section is empty.

Jump to

Keyboard shortcuts

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