Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brickchain/go-logger.v1
Logging framework for Integrity components
https://github.com/brickchain/go-logger.v1
golang integrity library logger logrus
Last synced: 16 days ago
JSON representation
Logging framework for Integrity components
- Host: GitHub
- URL: https://github.com/brickchain/go-logger.v1
- Owner: Brickchain
- License: bsd-2-clause
- Created: 2017-12-08T14:51:06.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-12T10:07:17.000Z (over 6 years ago)
- Last Synced: 2024-06-21T16:24:14.566Z (6 months ago)
- Topics: golang, integrity, library, logger, logrus
- Language: Go
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Logging framework for Integrity components
This logger components is used by Integrity components that logs output.
Based on [Logrus](https://github.com/Sirupsen/logrus).
It manages logger context and settings on a global level by using the package level functions.
## Usage
```go
package mainimport (
"github.com/brickchain/go-logger.v1"
"os"
)func main() {
logger.SetOutput(os.Stdout)
logger.SetFormatter("json")
logger.SetLevel("debug")
logger.AddContext("some_key", "some_value")
localLogger := logger.WithField("my_local_key", "my_local_value")
localLogger.Info("Test")
}
```