ackyLog

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

README

ackyLog

Incredibly Simple custom logger that adds a few extra bells and whistles on standard logging in Go.

Requirements

Just Go. Developed with Go 1.16.4

Dependancies

Uses the rather awesome github.com/davecgh/go-spew library. No other dependancies

Usage

Basic

This Outputs like this.

Basic

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColourMap = map[string]string{
	"F-BLACK":   "\033[1;30m",
	"F-RED":     "\033[1;31m",
	"F-GREEN":   "\033[1;32m",
	"F-YELLOW":  "\033[1;33m",
	"F-BLUE":    "\033[1;34m",
	"F-MAGENTA": "\033[1;35m",
	"F-CYAN":    "\033[1;36m",
	"F-WHITE":   "\033[1;37m",
	"F-NORMAL":  "\033[0;37m",
	"F-RESET":   "\033[0m",
	"B-BLACK":   "\033[1;40m",
	"B-RED":     "\033[1;41m",
	"B-GREEN":   "\033[1;42m",
	"B-YELLOW":  "\033[1;43m",
	"B-BLUE":    "\033[1;44m",
	"B-MAGENTA": "\033[1;45m",
	"B-CYAN":    "\033[1;46m",
	"B-WHITE":   "\033[1;47m",
}
View Source
var SHOWCOLOURS = true
View Source
var SHOWDEBUG = true

Functions

func CUSTOM added in v1.0.1

func CUSTOM(Header string, Message string, variables ...interface{})

CUSTOM - Just in Case you want a Custom Header

func DEBUG

func DEBUG(Message string, variables ...interface{})

DEBUG - Write a DEBUG message to the LOG

func ERROR

func ERROR(Message string, variables ...interface{})

ERROR - Write an ERROR message to the LOG

func INFO

func INFO(Message string, variables ...interface{})

INFO - Write an INFO Message and write to the logs.

func RAW added in v1.0.5

func RAW(Message string)

RAW - Without the Sprintf

func SPEW

func SPEW(variables ...interface{})

SPEW - Dump a variable to the Logs.

func TIMED

func TIMED(Message string, variables ...interface{}) func()

TIMED - Start a timer and return a function to call once complete.

func WARNING

func WARNING(Message string, variables ...interface{})

WARNING - Write a Warning message to the Log

func WEB

func WEB(Message string, r *http.Request, variables ...interface{})

WEB - Write a WEB Message to the Logs

func WEBFORM

func WEBFORM(Message string, r *http.Request, variables ...interface{})

WEBFORM - Dump all Web Values to the Log. (Carefull with Passwords)

Types

This section is empty.

Directories

Path Synopsis
_examples
web

Jump to

Keyboard shortcuts

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