Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/progrhyme/go-lv
A simple leveled logger for Go
https://github.com/progrhyme/go-lv
Last synced: 2 days ago
JSON representation
A simple leveled logger for Go
- Host: GitHub
- URL: https://github.com/progrhyme/go-lv
- Owner: progrhyme
- License: mit
- Created: 2020-07-06T17:03:02.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-13T17:43:42.000Z (over 4 years ago)
- Last Synced: 2023-08-01T06:43:41.423Z (over 1 year ago)
- Language: Go
- Homepage: https://pkg.go.dev/github.com/progrhyme/go-lv
- Size: 42 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![latest-tag](https://badgen.net/github/tag/progrhyme/go-lv)](https://github.com/progrhyme/go-lv/releases)
[![go-test](https://github.com/progrhyme/go-lv/workflows/go-test/badge.svg)](https://github.com/progrhyme/go-lv/actions?query=workflow%3Ago-test)# go-lv
Package lv implements a simple logger with filtering level.
This package extends the standard package log and aimed to be minimal.
# Usage
Using package-level logger:
```go
import "github.com/progrhyme/go-lv"func main() {
name := "Bob"
// lv.SetLevel(lv.LDebug) // for debug
lv.Infof("Hello, %s!", name)
}
```Creating a logger:
```go
import (
"log""github.com/progrhyme/go-lv"
)func main() {
logger := lv.New(os.Stderr, lv.LWarn, log.LstdFlags)
logger.Warn("Something is wrong!")
}
```# Documenatation
https://pkg.go.dev/github.com/progrhyme/go-lv
# Limitation
No support for structured logging.
# License
The MIT License.
Copyright (c) 2020 IKEDA Kiyoshi.