Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 27 days 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 (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-17T22:28:32.000Z (almost 2 years ago)
- Last Synced: 2024-10-22T07:04:13.551Z (2 months 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).
[![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/lthibault/log)
[![Go Report Card](https://goreportcard.com/badge/github.com/SentimensRG/ctx?style=flat-square)](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`.