golog

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: MIT Imports: 6 Imported by: 23

README

golog

Golang very basic log functions on the console with ansi colors (Info,Trace, Warn and Err)

Documentation

Overview

very basic colorfoul log on the stderr console for more serious needs consider using https://github.com/uber-go/zap

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoItOrDie

func DoItOrDie(err error, message string, v ...interface{})

func Err

func Err(message string, v ...interface{})

func Fatal

func Fatal(message string, v ...interface{})

Fatalf is equivalent to Err() followed by a call to os.Exit(1).

func GetCaller

func GetCaller(skip int) (file string, line int, function string)

func GetTimeStamp

func GetTimeStamp() string

func Info

func Info(message string, v ...interface{})

func Trace

func Trace(message string, v ...interface{}) (string, time.Time)

func Un

func Un(message string, start time.Time)

to be used with Trace like this at the begining of the body of a function USAGE : defer golog.Un(golog.Trace("your function message"))

func Warn

func Warn(message string, v ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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