resty-zerolog

A simple wrapper for zerolog to use it as an implementation of Logger interface from Resty

https://github.com/psapezhka/resty-zerolog

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.2%) to scientific vocabulary

Keywords

golang logging resty zerolog
Last synced: 6 months ago · JSON representation ·

Repository

A simple wrapper for zerolog to use it as an implementation of Logger interface from Resty

Basic Info
  • Host: GitHub
  • Owner: psapezhka
  • License: mpl-2.0
  • Language: Go
  • Default Branch: main
  • Homepage:
  • Size: 57.6 KB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • Open Issues: 2
  • Releases: 2
Topics
golang logging resty zerolog
Created 11 months ago · Last pushed 9 months ago
Metadata Files
Readme Contributing Funding License Code of conduct Citation Security Authors

README.md

resty-zerolog

[![Go Report Card](https://goreportcard.com/badge/github.com/weastur/resty-zerolog)](https://goreportcard.com/report/github.com/weastur/resty-zerolog) [![codecov](https://codecov.io/gh/weastur/resty-zerolog/graph/badge.svg?token=CYFYMFHNON)](https://codecov.io/gh/weastur/resty-zerolog) [![test](https://github.com/weastur/resty-zerolog/actions/workflows/test.yaml/badge.svg)](https://github.com/weastur/resty-zerolog/actions/workflows/test.yaml) [![lint](https://github.com/weastur/resty-zerolog/actions/workflows/lint.yaml/badge.svg)](https://github.com/weastur/resty-zerolog/actions/workflows/lint.yaml)
![GitHub Release](https://img.shields.io/github/v/release/weastur/resty-zerolog) ![GitHub commits since latest release](https://img.shields.io/github/commits-since/weastur/resty-zerolog/latest) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/weastur/resty-zerolog) ![GitHub License](https://img.shields.io/github/license/weastur/resty-zerolog)

resty-zerolog is a simple wrapper for zerolog to use it as an implementation of Logger interface from Resty

Why?

I wanted to use zerolog as a logger for Resty, but Resty does not support zerolog out of the box. So I created this simple wrapper.

Yes, Logger interface from Resty is very simple, and you can implement it in a few lines of code, but I wanted to have a ready-to-use solution to not repeat myself in every project I use resty and zerolog.

Installation

bash go get -u github.com/weastur/resty-zerolog

Usage

```go import ( "github.com/rs/zerolog/log" restyzerolog "github.com/weastur/resty-zerolog" "resty.dev/v3" )

client := resty.New() client.SetLogger(restyzerolog.New(log.Logger)) ```

Despite it's extremely simple, you can refer to the example and godoc to see a bit more.

Contributing

Contributions are welcome! Please read the CONTRIBUTING.md file for details on how to contribute to this project.

Security

Refer to the SECURITY.md file for more information.

License

Mozilla Public License 2.0

Refer to the LICENSE file for more information.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "Asset Manager"
version: "v1.0.0"
type: software
authors:
  - family-names: "Sapezhka"
    given-names: "Pavel"
doi: 10.5281/zenodo.1234
date-released: 2025-03-23
url: "https://github.com/weastur/resty-zerolog"
repository-code: "https://github.com/weastur/resty-zerolog"
abstract: >-
  A simple wrapper for zerolog to use it as an implementation of Logger for Resty.
keywords:
  - go
  - zerolog
  - resty
  - logging
license: MPL-2.0

GitHub Events

Total
  • Issue comment event: 1
  • Pull request event: 1
  • Create event: 1
Last Year
  • Issue comment event: 1
  • Pull request event: 1
  • Create event: 1

Dependencies

.github/workflows/gitlint.yaml actions
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/lint.yaml actions
  • actions/checkout v4 composite
  • actions/setup-go v5 composite
  • golangci/golangci-lint-action v6 composite
.github/workflows/test.yaml actions
  • actions/checkout v4 composite
  • actions/setup-go v5 composite
  • codecov/codecov-action v5 composite
go.mod go