Skip to content

Commit

Permalink
Revert "Use robot.logger instead of console"
Browse files Browse the repository at this point in the history
This reverts commit 778a393, which
introduced a crash.

Closes #48
Reopens #42
  • Loading branch information
strugee committed Mar 27, 2018
1 parent d6e04ae commit 98fdeed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/github-repo-event-notifier.coffee
Expand Up @@ -58,7 +58,7 @@ if eventTypesRaw?

return "#{e}#{append}"
else
robot.logger.warning("github-repo-event-notifier is not setup to receive any events (HUBOT_GITHUB_EVENT_NOTIFIER_TYPES is empty).")
console.warn("github-repo-event-notifier is not setup to receive any events (HUBOT_GITHUB_EVENT_NOTIFIER_TYPES is empty).")

module.exports = (robot) ->
robot.router.post "/hubot/gh-repo-events", (req, res) ->
Expand Down Expand Up @@ -98,10 +98,10 @@ module.exports = (robot) ->
announceRepoEvent adapter, data, eventType, (what) ->
robot.messageRoom room, what
else
robot.logger.info "Ignoring #{eventType}:#{data.action} as it's not allowed."
console.log "Ignoring #{eventType}:#{data.action} as it's not allowed."
catch error
robot.messageRoom room, "Whoa, I got an error: #{error}"
robot.logger.error "Github repo event notifier error: #{error}. Request: #{req.body}"
console.log "Github repo event notifier error: #{error}. Request: #{req.body}"

res.end ""

Expand Down

0 comments on commit 98fdeed

Please sign in to comment.