You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to log my own custom errors. Also, I don't want to log every second the message "availableObjects.length=x". Can you inherite the pool from EventEmitter and just emit events so we can catch them and do whatever we want? It's a very easy modification. Just replace this line when you export the module:
Very down with this idea in general. Have a couple of questions though.
Would we continue to also support log at the same time?
For error events, should we only emit if we have a listener? (if we emit regardless and there is no listener then we will blow things up for the user).
I can see this either being a something to bump the major version for (so we can go crazy and change behaviour) or being conservative changes and just a minor version bump.
Hi,
I'd like to log my own custom errors. Also, I don't want to log every second the message "availableObjects.length=x". Can you inherite the pool from EventEmitter and just emit events so we can catch them and do whatever we want? It's a very easy modification. Just replace this line when you export the module:
By this:
You must add the events module:
Then, instead of calling the log function you can throw an event with the data. For example, the createResource function:
And to catch it from outside your library:
The text was updated successfully, but these errors were encountered: