Skip to content

A small log package inspired by a post from Dave Cheney

License

Notifications You must be signed in to change notification settings

mattrbianchi/twig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twig

An experimental, lightweight log package based off of Dave Cheney's post: https://dave.cheney.net/2015/11/05/lets-talk-about-logging

The goal of twig was to see if a wrapper around Go's own standard log package could be made that would promote Dave's suggestions around good logging practices.

On one hand, this package hides a lot of the log functions in the standard log package.

On the other, it adds a Debug level where developers could control whether messages logged with the Debug and Debugf functions actually make it to their intended destination or vanish into thin air for production environments through the use of SetDebug.

The only other level is Info, used through the Info and Infof functions. These functions will always write their messages to their Writers.

Because Twig is just a wrapper, one can customize it the same as with the standard log package.

About

A small log package inspired by a post from Dave Cheney

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages