https://github.com/lthibault/log
High-level logging API built on top of https://github.com/sirupsen/logrus
https://github.com/lthibault/log
logging structured-logging
Last synced: about 1 year ago
JSON representation
High-level logging API built on top of https://github.com/sirupsen/logrus
- Host: GitHub
- URL: https://github.com/lthibault/log
- Owner: lthibault
- License: mit
- Created: 2019-03-19T17:17:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-17T22:28:32.000Z (over 3 years ago)
- Last Synced: 2025-02-03T13:45:08.844Z (over 1 year ago)
- Topics: logging, structured-logging
- Language: Go
- Size: 31.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# log
A high-level API adapter for [logrus](github.com/sirupsen/logrus).
[](https://godoc.org/github.com/lthibault/log)
[](https://goreportcard.com/report/github.com/lthibault/log)
## Overview
Package `log` provides a high-level API adapter around [logrus](github.com/sirupsen/logrus). It is intended as a personal utility. You are likely to prefer using Logrus directly.
This package makes the following changes to the logrus API:
- [Functional options](https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis) for a more user-friendly API.
- Adds `Logger.With` method, which applies log fields directly from objects satisfying `Loggable`.
- Remove panic-level logging, as `Panic` and `Fatal` are semantically equivalent.
Escape hatches are provided to maintain full compatibility with `Logrus`.