Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

More logging #96

Closed
ChrisCinelli opened this issue Jan 21, 2016 · 0 comments
Closed

More logging #96

ChrisCinelli opened this issue Jan 21, 2016 · 0 comments

Comments

@ChrisCinelli
Copy link
Contributor

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 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.

@ChrisCinelli ChrisCinelli changed the title Better logging More logging Jan 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants