Comments (4)
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.
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.
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.
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)
- Unclear procedure/documentation around setup
- Default to TCP socket for core agent communications
- scout.install Promise never resolves HOT 6
- Update core agent version to 1.3.0
- Scout does not monitor endpoints behind Express Router HOT 3
- Memory leak HOT 4
- Remove event listeners upon shutdown?
- Express v5 support and failure-proofing
- Significant RAM and CPU impact HOT 5
- More intuitive default logger with level filtering
- Sudden exits on Mac OSX
- Bad/Invalid endpoint name in Controller logs
- Add documentation for clustered deployments HOT 1
- Incorrect check if agent is running on a TCP socket HOT 2
- [NestJS] Stopping undefined span HOT 4
- Add custom provider for nest integration
- How do I import when using Typescript? HOT 5
- Investigate monitoring of PostgreSQL queries when using Sequelize
- TypeError: this.logFn is not a function HOT 5
- Sending additional information for background jobs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scout_apm_node.