https://github.com/jn0/go-log
A la pythonic logging
https://github.com/jn0/go-log
go golang golang-library golang-package logg logging python
Last synced: 6 months ago
JSON representation
A la pythonic logging
- Host: GitHub
- URL: https://github.com/jn0/go-log
- Owner: jn0
- License: mit
- Created: 2019-12-24T09:59:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-18T13:13:09.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T02:12:28.349Z (about 2 years ago)
- Topics: go, golang, golang-library, golang-package, logg, logging, python
- Language: Go
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-log
A la pythonic logging.
Based on the standard `log` module.
Tested using [github.com/stretchr/testify](https://github.com/stretchr/testify).
The `Fatal`s were turned into `panic`s in all the tests.
coverage: 100% of statements using
```bash
#!/bin/bash
profile=cover.out # use this coverage profile
html=c.html # make this HTML file
set -e # stop on any error
rm -f "${profile}" "${html}" # clear files
go test -coverprofile "${profile}" # generate profile
sed -e 's,^_.*/\([^/]\+\)$,./\1,' -i "${profile}" # make it usable
go tool cover -html="${profile}" -o "${html}" # generate HTML
rm -f "${profile}" # remove patched profile
ls -l "${html}" # notify on completion
# EOF #
```
# EOF #