gommon
gommon copied to clipboard
Common packages for Go
I think these atomic operations in logger are not useful, reasons as below: 1. Usually, we should init logger level at the beginning of the process, before the service starts...
This will make it possible for callers who wrap to increase the skip number as they see fit See #41
Fixed syntax error in example code: `import github.com/labstack/gommon/color` is invalid Go syntax because it omits quotes. Replaced with `import "github.com/labstack/gommon/color"`
All tests for "EB" fail on arm64: ``` --- FAIL: TestBytesParse (0.00s) bytes_test.go:211: Error Trace: bytes_test.go:211 Error: Should be true Test: TestBytesParse bytes_test.go:215: Error Trace: bytes_test.go:215 Error: Should be true...
In our code base we are wrapping gommon.Log, however when looking at the log output, the referencing sourcecode and line number are incorrect, since gommon.Log uses a hardcoded skip parameter....
This replaces the usage of math/rand with crypto/rand to support downstream usages of the random package that have security implications, such as the csrf middleware. I don't see it used...
8 exbi equals 2^64, therefore it cannot be stored in int64. The tests use the fact that on x86_64 the following expressions holds true: int64(0) - 1 == math.MaxInt64. However,...
As can currently be seen at https://people.canonical.com/~ubuntu-archive/proposed-migration/update_excuses.html#golang-github-labstack-gommon, the tests for the bytes package fail on arm64, ppc64el and s390x architectures. This turns out to be because the tests depend on...
Remove un-necessary locking in the logging API.
Improve log function at off level