Name: goutils
Owner: Stark & Wayne
Description: S&W Go Utilities
Created: 2015-11-20 17:49:34.0
Updated: 2016-07-11 17:04:45.0
Pushed: 2017-11-19 04:37:18.0
Homepage: null
Size: 582
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
S&W Go Utilities
NOTICE: THIS REPOSITORY IS BEING RETIRED
You may want to refer to these other repos, which will be supported moving forward:
Additionally, timestamp
and botta
are both being deprecated
for lack of use.
Get:
et github.com/starkandwayne/goutils/{{pkg}}
Import:
rt "github.com/starkandwayne/goutils/{{pkg}}"
Setup logging with SetupLogging()
:
e.g.:
SetupLogging(LogConfig{ Type: "console", Level: "warning" })
If logging is not setup, then the messages will simply go to stdout
. If logging cannot be setup for file
or syslog
, then the default stdout
will be used. An error message will print to stderr
to notify you if this occurs.
Log has the following levels defined:
Usage is the same as Sprintf
/Printf
statements - simply append an f
to the desired level. e.g.:
_mesg := "This isn't a bug."
Debugf("I really need to know this in debug mode: %s", dbug_mesg)