https://github.com/shoenig/loggy
Go's worst logging package
https://github.com/shoenig/loggy
hacktoberfest logging worst
Last synced: 12 months ago
JSON representation
Go's worst logging package
- Host: GitHub
- URL: https://github.com/shoenig/loggy
- Owner: shoenig
- License: bsd-3-clause
- Created: 2019-01-21T15:38:54.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-01-02T14:51:46.000Z (over 2 years ago)
- Last Synced: 2025-02-09T00:29:00.191Z (over 1 year ago)
- Topics: hacktoberfest, logging, worst
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
loggy
=====
Go's worst logging package.

# Project Overview
Package `loggy` provides a simple logging library. It is focused on providing
the bare minimum implementation of a leveled-logger for Go projects.
# Getting Started
The `loggy` package can be installed by running:
```
$ go get github.com/shoenig/loggy
```
#### Example Usage
A source file with this block
```golang
log := New("my-thing")
log.Tracef("this is trace %d", 1)
log.Infof("this is info %d", 2)
log.Warnf("this is warn %d", 3)
log.Errorf("this is error %d", 4)
```
Will produce output
```Text
2019/01/21 09:36:32 TRACE [my-thing] this is trace 1
2019/01/21 09:36:32 INFO [my-thing] this is info 2
2019/01/21 09:36:32 WARN [my-thing] this is warn 3
2019/01/21 09:36:32 ERROR [my-thing] this is error 4
```
# Contributing
Package `loggy` is pretty minimalist, and so it's basically feature complete.
Bug fixes and good ideas though are always welcome, please just file an issue.
# License
The `github.com/shoenig/loggy` module is open source under the [BSD-3-Clause](LICENSE) license.