logthis

package
v0.19.6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MIT Imports: 7 Imported by: 7

Documentation

Overview

Package logthis provides a way to either print, log, and/or send a string to channels. Provides a default logger initiated on import.

Index

Constants

View Source
const (
	NORMAL = iota
	VERBOSE
	VERBOSEST
	VERBOSESTEST
)

Variables

This section is empty.

Functions

func Error

func Error(err error, level int)

Error logs errors with a given level.

func ErrorIfNotNil added in v0.17.0

func ErrorIfNotNil(errs []error, level int)

ErrorIfNotNil logs non-nil errors from a slice

func Info

func Info(msg string, level int)

Info logs strings with a given level, optionally sending info to chans.

func SetLevel

func SetLevel(value int)

func SetStdOutput

func SetStdOutput(value bool)

func Subscribe added in v0.7.0

func Subscribe() chan interface{}

func TimedInfo added in v0.18.1

func TimedInfo(msg string, level int)

func Unsubscribe added in v0.7.0

func Unsubscribe(msgCh chan interface{})

Types

type LogThis

type LogThis struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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