log

package
v0.3.0-docs.0...-f96dd80 Latest Latest
Warning

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

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

Documentation

Overview

Package log implements the qed/log wrapper that formats the logs in our custom format as well as logging levels.

Index

Constants

View Source
const (
	SILENT = "silent"
	ERROR  = "error"
	INFO   = "info"
	DEBUG  = "debug"
)

Log levels constants

Variables

View Source
var (

	// Fatal is the public log function to write to stdOut and stop execution
	// Same as Error.
	Fatal = Error

	// Panic is the public log function to write to stdOut and stop execution
	// Same as Error.
	Panic = Error
)
View Source
var (

	// Fatalf is the public log function with params to write to stdOut and
	// stop execution. Same as Errorf
	Fatalf = Errorf

	// Panicf is the public log function with params to write to stdOut and
	// stop execution. Same as Errorf
	Panicf = Errorf
)

Functions

func Debug

func Debug(v ...interface{})

Debug is the public log function to write information relative to internal debug information.

func Debugf

func Debugf(format string, v ...interface{})

Debugf is the public log function to write information with params relative to internal debug information.

func Error

func Error(v ...interface{})

Error is the public log function to write to stdOut and stop execution.

func Errorf

func Errorf(format string, v ...interface{})

Errorf is the public log function with params to write to stdOut and stop execution.

func GetLogger

func GetLogger() *log.Logger

GetLogger returns a default log.Logger instance. Useful to let third party modules to use the same formatting options that the defined here.

func GetLoggerLevel

func GetLoggerLevel() string

GetLoggerLevel returns the string representation of the log.Logger level.

func Info

func Info(v ...interface{})

Info is the public log function to write information relative to the usage of the qed package.

func Infof

func Infof(format string, v ...interface{})

Info is the public log function to write information with params relative to the usage of the qed package.

func SetLogger

func SetLogger(namespace, lv string)

SetLogger is a function that switches between verbosity loggers. Default is error level. Available levels are "silent", "debug", "info" and "error".

Types

This section is empty.

Jump to

Keyboard shortcuts

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