log

package module
v0.0.0-...-502df4f Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 3

README

Package playground/log

Patched to be importable from GitHub.

This is a very simple log package, capable of logging to either stdout or a file. It's intended to be a lightweight alternative to fmt.Printf() that adds timestamp, category, etc.

Special thanks to Playground Global, LLC for open-sourcing this software. See LICENSE for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(component string, extras ...interface{})

func Error

func Error(component string, extras ...interface{})

func SetLogFile

func SetLogFile(fileName string)

func SetLogLevel

func SetLogLevel(newLevel LogLevel)

func SetQuiet

func SetQuiet(isQuiet bool)

func Status

func Status(component string, extras ...interface{})

func Warn

func Warn(component string, extras ...interface{})

Types

type LogLevel

type LogLevel int
const (
	LEVEL_ERROR LogLevel = iota
	LEVEL_WARNING
	LEVEL_STATUS
	LEVEL_DEBUG
)

Jump to

Keyboard shortcuts

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