golog

package module
v0.0.0-...-737582b Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: MIT Imports: 3 Imported by: 1

README

golog

incredibly simple go colorized cli logger

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	Name string
}

Log logger

func (*Log) Fatal

func (log *Log) Fatal(action string, err interface{}) string

Fatal logs to os.Stderr and exits 1

func (*Log) Info

func (log *Log) Info(action string, text interface{}) string

Info displays information about the program durring runtime.

func (*Log) Print

func (log *Log) Print(m LogMessage) string

Print is a helper function for log.Info and log.Fatal, but can be called directly if you want more control over the exit code.

type LogMessage

type LogMessage struct {
	Action   string
	Message  interface{}
	ExitCode int
}

LogMessage message structure

Jump to

Keyboard shortcuts

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