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
{{ message }}
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
In this way you can for example add here logging with debug('botkit:event:trigger')(event, ":", data);
When I had some problems, it has been difficult to find out what is going on and I had to add a few custom botkit.debug in botkit code. On the other end, some of these botkit.debug made the logs very noisy.
Using the debug module you can selectively enabling the kind of debug you want setting the environment variable DEBUG. It is a "standard" used by a lot on npm modules including express, socket.io, etc.
On a side note, it is unclear why botkit.debugalways log to the console and botkit.log it is more flexible and let you even choose to redefine a handler. I used to use Winston everywhere for logging but lately with docker and so many log collection services (ex: papertrail), I started sending everything to the console and capture that output. I would recommend that is a way or another you make log and debug work in the same way.
The text was updated successfully, but these errors were encountered:
Could you add more logging and use the great https://github.com/visionmedia/debug to do so?
In this way you can for example add here logging with
debug('botkit:event:trigger')(event, ":", data);
When I had some problems, it has been difficult to find out what is going on and I had to add a few custom
botkit.debug
in botkit code. On the other end, some of thesebotkit.debug
made the logs very noisy.Using the
debug
module you can selectively enabling the kind of debug you want setting the environment variableDEBUG
. It is a "standard" used by a lot on npm modules including express, socket.io, etc.On a side note, it is unclear why
botkit.debug
always log to the console andbotkit.log
it is more flexible and let you even choose to redefine a handler. I used to use Winston everywhere for logging but lately with docker and so many log collection services (ex: papertrail), I started sending everything to the console and capture that output. I would recommend that is a way or another you makelog
anddebug
work in the same way.The text was updated successfully, but these errors were encountered: