https://github.com/glendc/go-mini-log
a minimalistic logger for golang applications
https://github.com/glendc/go-mini-log
golang log logging minimal
Last synced: over 1 year ago
JSON representation
a minimalistic logger for golang applications
- Host: GitHub
- URL: https://github.com/glendc/go-mini-log
- Owner: GlenDC
- License: bsd-3-clause
- Created: 2017-04-16T14:05:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-29T23:45:28.000Z (about 9 years ago)
- Last Synced: 2024-10-11T23:43:57.868Z (over 1 year ago)
- Topics: golang, log, logging, minimal
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-mini-log
This package is a modified version of the standard [pkg/log][pkglog] code.
The goal of this package is to provide a minimalistic package, which allows for the seperation
of _debug_ and _info_ statements. _Debug_ statements which are meant for the developer only,
while _info_ statements remain in production and thus can be seen by the user.
The standard logging package is works as it is, except for 2 points:
+ It does not provide the option to have verbose logging for debugging purposes only;
+ It has way to many logging levels, which are really not needed;
This package aims to resolve these issues by using what seems to work well,
adding to it what was missing, and removing what wasn't needed.
_Warnings_ are either _info_ or _error_,
so logging them as a seperate level doesn't make sense.
_Errors_ should be either handled or they are fatal.
If they are handled, it doesn't make sense to log them as errors any longer,
and should be logged as _info_ instead.
This package is not fancy,
and should be seen as a practical version of [pkg/log][pkglog].
[pkglog]:https://github.com/golang/go/tree/master/src/log