koan

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: MPL-2.0 Imports: 3 Imported by: 8

README

Koan

GitHub go.mod Go version Go Report Card GitHub Workflow Status (branch)

GitHub Release Date GitHub commits since latest release (by date) GitHub

About

A lightweight logging package for Go.

License

Licensed under Mozilla Public License 2.0

Documentation

Overview

Package koan provides utility logging functions designed to standardise and colorize the logged output

Index

Constants

View Source
const (
	INFOPREFIX     = "INFO"
	WARNPREFIX     = "WARN"
	ERRPREFIX      = "ERROR"
	FATALERRPREFIX = "FATAL ERROR"
)

Variables

View Source
var (
	INFOCOLOR = color.Gray
	WARNCOLOR = color.Yellow
	ERRCOLOR  = color.Red
)

Functions

This section is empty.

Types

type Logger

type Logger struct{}

Logger will hold configuration specific to the logger package

func (*Logger) Error

func (*Logger) Error(msg string, err error)

Error provides logging with an Error prefix

func (*Logger) FatalError

func (*Logger) FatalError(msg string, err error)

FatalError provides logging with a FatalError prefix and terminates execution

func (*Logger) Info

func (*Logger) Info(msg string)

Info provides logging with an Info prefix

func (*Logger) Warn

func (*Logger) Warn(msg string)

Warn provides logging with a Warning prefix

Jump to

Keyboard shortcuts

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