Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-11T03:10:50.000Z (almost 4 years ago)
- Last Synced: 2024-04-13T18:51:59.331Z (8 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
[![GoDoc](http://godoc.org/github.com/mborders/logmatic?status.png)](http://godoc.org/github.com/mborders/logmatic)
[![Build Status](https://travis-ci.org/mborders/logmatic.svg?branch=master)](https://travis-ci.org/mborders/logmatic)
[![Go Report Card](https://goreportcard.com/badge/github.com/mborders/logmatic)](https://goreportcard.com/report/github.com/mborders/logmatic)
[![codecov](https://codecov.io/gh/mborders/logmatic/branch/master/graph/badge.svg)](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")
```![Example results](example.png?raw=true "Example results")