https://github.com/progrhyme/go-lv
A simple leveled logger for Go
https://github.com/progrhyme/go-lv
Last synced: 3 months 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-13T17:43:42.000Z (about 5 years ago)
- Last Synced: 2025-02-15T18:55:09.099Z (5 months 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
[](https://github.com/progrhyme/go-lv/releases)
[](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.