log

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

* Cryptexly - Copyleft of Xavier D. Johnson. * me at xavierdjohnson dot com * http://www.xavierdjohnson.net/ * * See LICENSE.

Index

Constants

View Source
const (
	BOLD = "\033[1m"
	DIM  = "\033[2m"

	FG_BLACK = "\033[30m"
	FG_WHITE = "\033[97m"

	BG_DGRAY  = "\033[100m"
	BG_RED    = "\033[41m"
	BG_GREEN  = "\033[42m"
	BG_YELLOW = "\033[43m"
	BG_LBLUE  = "\033[104m"

	RESET = "\033[0m"
)

https://misc.flogisoft.com/bash/tip_colors_and_formatting

View Source
const (
	DEBUG = iota
	INFO
	IMPORTANT
	WARNING
	ERROR
	FATAL
)

Variables

View Source
var (
	WithColors = true
	Output     = os.Stderr
	DateFormat = "2006-01-02 15:04:05"
	MinLevel   = DEBUG
)

Functions

func Api

func Api(level int, c *gin.Context, format string, args ...interface{})

func Bold

func Bold(s string) string

func Debugf

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

func Dim

func Dim(s string) string

func Errorf

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

func Fatal

func Fatal(err error)

func Importantf

func Importantf(format string, args ...interface{})

func Infof

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

func Log

func Log(level int, format string, args ...interface{})

func Raw

func Raw(s string)

func Warningf

func Warningf(format string, args ...interface{})

func Wrap

func Wrap(s, effect string) string

Types

type Handler

type Handler func(format string, args ...interface{})

Jump to

Keyboard shortcuts

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