log

package
v1.13.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

func HandleError(log *Logger, printUsage bool, format string, a ...interface{})

HandleError prints the error to the standard error, prints the usage if the `printUsage` flag is true, exports the error to the error file and exits the process with the exit code.

func Setup

func Setup()

Setup sets up default logging configs for Nomos applications and logs the preamble.

Types

type Logger

type Logger struct {
	logr.Logger
	// contains filtered or unexported fields
}

Logger embeds logr.Logger

func NewLogger

func NewLogger(l logr.Logger, root string, errorFile string) *Logger

NewLogger returns logr implemented logr.Logger.

func (*Logger) DeleteErrorFile

func (l *Logger) DeleteErrorFile()

DeleteErrorFile deletes the error file.

func (*Logger) Error

func (l *Logger) Error(err error, msg string, kvList ...interface{})

Error implements logr.Logger.Error.

func (*Logger) ExportError

func (l *Logger) ExportError(content string)

ExportError exports the error to the error file if --export-error is enabled.

Jump to

Keyboard shortcuts

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