https://github.com/gregoryv/fox
Simple logger interface for Go
https://github.com/gregoryv/fox
go golang logging test
Last synced: about 1 year ago
JSON representation
Simple logger interface for Go
- Host: GitHub
- URL: https://github.com/gregoryv/fox
- Owner: gregoryv
- License: mit
- Created: 2020-01-11T12:03:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-13T14:51:07.000Z (over 5 years ago)
- Last Synced: 2025-02-05T07:19:38.216Z (over 1 year ago)
- Topics: go, golang, logging, test
- Language: Go
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
[fox](https://godoc.org/github.com/gregoryv/fox) - package provides an alternate Logger design

## Quick start
go get github.com/gregoryv/fox
Log := fox.NewSyncLog(os.Stdout).Log
Log("something")
func Test_thing(t *testing.T) {
thingWith.Logger := t
...
}
## Design
Based on the principle that interfaces should be kept small this package
provides a Logger interface with one func only
Log(v ...interface{})

The design focuses on separation between writing and formating
- SyncLog only writes messages to the output ensuring each one ends with a new line