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

Commit

Permalink
Merge pull request #299 from jayjanssen/logger_example
Browse files Browse the repository at this point in the history
Show winston levels being set
  • Loading branch information
Ben Brown authored Aug 13, 2016
2 parents 594a0bb + 622f453 commit ea0bc59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ Then, use it when you create your bot:
```javascript
var controller = Botkit.slackbot({
logger: new winston.Logger({
levels: winston.config.syslog.levels
transports: [
new (winston.transports.Console)(),
new (winston.transports.File)({ filename: './bot.log' })
Expand All @@ -857,6 +858,7 @@ var controller = Botkit.slackbot({
});
```

Note: with Winston, we must use the syslog.levels over the default or else some botkit log messages (like 'notice') will not be logged properly.

##Use BotKit with an Express web server
Instead of controller.setupWebserver(), it is possible to use a different web server to manage authentication flows, as well as serving web pages.
Expand Down

0 comments on commit ea0bc59

Please sign in to comment.