Coder Social home page Coder Social logo

Comments (8)

panva avatar panva commented on May 18, 2024 1

This already looks the right amount of "simple" I shoot for ;) Let me get back to you tomorrow, I will give it some thought whether to do emits or a logger.

from node-openid-client.

panva avatar panva commented on May 18, 2024

Hello @JoshBarr, i think this would be a great addition, even better if you could contribute it.

my $.02 towards the API solution direction,

  • do we need issuer / client instance specific loggers?
  • do we need Issuer / Client specific loggers? > can't we do with one logger setting (similar to defaultHttpOptions set on Issuer) This would greatly reduce the efforts and keep the API simple and understandable.
  • can the default logger state be disabled / not provided?
  • is your problem error specific? Would you consider Issuer/Client being an EventEmitter?

from node-openid-client.

JoshBarr avatar JoshBarr commented on May 18, 2024

You're right, we probably don't need client-specific loggers. Something like this?

const Issuer = require('openid-client').Issuer;
Issuer.logger = console;

Making the Iss/Client into EventEmitters would actually be really neat – certainly would make logging easier, as we can just attach the logger to the events.

from node-openid-client.

panva avatar panva commented on May 18, 2024

@JoshBarr what do you think of a simple inclusion of debug instead?

from node-openid-client.

JoshBarr avatar JoshBarr commented on May 18, 2024

Debug would be fine for our use case - we only need to log some internals for troubleshooting purposes.

from node-openid-client.

panva avatar panva commented on May 18, 2024

Sounds good!

from node-openid-client.

panva avatar panva commented on May 18, 2024

Feel free to open PR, 'till then i will be closing non-Issues.

from node-openid-client.

vancouverwill avatar vancouverwill commented on May 18, 2024

hi @panva I needed to add in some logs into a fork of this repo so we could see why it was failing for us, i.e. which stage and for what reason and thought it could be useful for others.

It looks like this issue is closed for a while but I still think it useful.

There are a couple of other things I need to do such as update docs and add logging to other functions but wanted to see your initial thoughts before I invest too much 👍

from node-openid-client.

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.