Code Monkey home page Code Monkey logo

Comments (4)

muhlemmer avatar muhlemmer commented on May 29, 2024

We can already look into adding context where required, while the exact way of implementing logging is being investigated. #309 is meant to split the change of context and logging.

from oidc.

muhlemmer avatar muhlemmer commented on May 29, 2024

The Go ecosystem is full of different loggers. Some better than others. Developers often have different opinions on this subject. I feel that it is not the place of a library to make a fixed decision on a log implementation.

Yes, xop looks like a good choice for the above reasons, but our zitadel product already build on logrus for example. There might be reasons to change that, but that could take some time after any decision is taken. Meanwhile, we (urgently) need to improve the situation around logging.

Inspired by jackc/pgx, which offers a general logging interface and adapters towards the major logging libraries that are available, I've looked around to the possibility if we can provide something similar.

https://github.com/go-logr/logr seems to be a very valid option to achieve a similar solution:

  • Defines an interface which can be used inside the oidc framework;
  • Can be put inside a context.Context and safely retrieved;
  • Implementations for most major loggers;
  • It is a mature package, used by many.
  • It is reasonable maintained. Last commit 3-dec-2022, and some PRs that are WIP by the developers.

By using logr we give power to the package users to make their own decisions on a logger. Also, I shouldn't be much work to create an adapter for xop.

from oidc.

muhlemmer avatar muhlemmer commented on May 29, 2024

CC @zitadel/engineers, @fforootd

from oidc.

muhlemmer avatar muhlemmer commented on May 29, 2024

logr proposal was accepted during internal meeting. This issue is replaced by user story #379.

from oidc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.