https://github.com/mborders/logmatic
Colorized logger for Golang with dynamic log level configuration
https://github.com/mborders/logmatic
color-log golang logging logging-library
Last synced: 5 months ago
JSON representation
Colorized logger for Golang with dynamic log level configuration
- Host: GitHub
- URL: https://github.com/mborders/logmatic
- Owner: mborders
- License: mit
- Created: 2018-11-07T01:52:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-11T03:10:50.000Z (over 4 years ago)
- Last Synced: 2024-04-13T18:51:59.331Z (12 months ago)
- Topics: color-log, golang, logging, logging-library
- Language: Go
- Size: 154 KB
- Stars: 16
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - logmatic - Colorized logger for Golang with dynamic log level configuration - ★ 1 (Logging)
- awesome-go-extra - logmatic - 11-07T01:52:45Z|2021-01-11T03:10:50Z| (Logging / Advanced Console UIs)
README
[](http://godoc.org/github.com/mborders/logmatic)
[](https://travis-ci.org/mborders/logmatic)
[](https://goreportcard.com/report/github.com/mborders/logmatic)
[](https://codecov.io/gh/mborders/logmatic)# logmatic
Colorized logger for Golang with dynamic log level configuration
Documentation here: https://godoc.org/github.com/mborders/logmatic
## Example Usage
```go
l := logmatic.NewLogger()
l.SetLevel(logmatic.DEBUG)l.Trace("This will not display")
l.Debug("Something happened")
l.Info("Here is some information")
l.Warn("Do not do that")
l.Error("Something bad happened...")l.SetLevel(logmatic.TRACE)
l.Trace("Now this will display")l.Fatal("The application will now exit")
```