gorillalog

package
v1.0.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(logStrings ...interface{})

Debug logs a string as DEBUG We write to disk if debug is true

func Error

func Error(logStrings ...interface{})

Error logs a string a ERROR We print to stdout, write to disk, and then panic

Example

ExampleError tests the output of a log sent to ERROR

// Set up what we expect
logString := "Error String!"

// Prepare to recover from a panic
defer func() {
	recover()
}()

// Run the function
Error(logString)
Output:

func Info

func Info(logStrings ...interface{})

Info logs a string as INFO We only print to stdout if verbose is true

func NewLog

func NewLog()

NewLog creates a file and points a new logging instance at it

func Warn

func Warn(logStrings ...interface{})

Warn logs a string as WARN We print to stdout and write to disk

Example

ExampleWarn tests the output of a log sent to WARN

// Set up what we expect
logString := "Warn String!"

// Run the function
Warn(logString)
Output:

Warn String!

Types

This section is empty.

Jump to

Keyboard shortcuts

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