Code Monkey home page Code Monkey logo

Comments (4)

 avatar commented on June 2, 2024

Generally winston is one of (if not the) the most commonly use logging libraries out there, so I'll use that.

Right now across the codebase logFn is used (it's more flexible to just provide a function than to require the user to provide a winston.Logger object), but what I can do is have that default to an internal winston instance.

NOTE - the user currently has the option to override this logFn by passing it into the Scout instance.

from scout_apm_node.

 avatar commented on June 2, 2024

Hey @cschneid right now the Scout instance actually uses a LogFn defined as the following:

export type LogFn = (message: string, level?: LogLevel) => void;

This is pretty flexible, and supports what you want here. There is also default implementation which uses console.log but it's not forced upon the user. Given that we don't know exactly what logging library/object the user will use this feels like it's enough to satisfy what you're looking for.

It feels like the work for this ticket is done -- is there anything else you can think of that this doesn't cover for the usual use case?

from scout_apm_node.

cschneid avatar cschneid commented on June 2, 2024

That's fine for now. However, it's quite likely we'll still want something more structured to make the per-framework integration smoother. The goal of having the install be near-zero code for the user makes some other components a bit more complex, especially around defaults and core stuff like this.

We can put this on pause and see what comes out when express or another framework starts getting more code around it.

from scout_apm_node.

 avatar commented on June 2, 2024

Hmnn OK so I think what might be useful in the near term is at the very least adding winston support -- I'll write a batteries-included function for integrating winston

from scout_apm_node.

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.