mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #514] Use Monolog with Slack #178
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#178
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thangngoc89 on GitHub (Feb 25, 2015).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/514
I am using Laravel 5 and I have some issues with Slack Handler integration.
I set up a ChromePHP Handler and It works perfectly so I assume there is no problems with Laravel.
This is the way I set up Slack Handler
I get my api token from https://api.slack.com/web#auth.
Is there anything wrong with my config?
At the same time, ChromePHP works and Slack doesn't work.
I really can't make Monolog work with Slack.
@Seldaek commented on GitHub (Feb 28, 2015):
Seems correct, but note that by default it logs only CRITICAL messages and above, so maybe you want to call
->setLevelon the handler as well to lower that to\Monolog\Logger::ERRORor something. That could explain why you don't get any messages on it.@wodCZ commented on GitHub (Mar 9, 2015):
channel name must include the hashtag, so in your case:
$slackHandler = new \Monolog\Handler\SlackHandler('my-api-token', '#general');@thangngoc89 commented on GitHub (Mar 9, 2015):
@wodCZ I tried that, and setLevel to 100 / debug .... I gave up
@wodCZ commented on GitHub (Mar 9, 2015):
@thangngoc89 try putting
echo fread($this->resource, 1000);in Monolog/Handler/SocketHandler at line 243 end of methodwriteToSocket- this way I got response from Slack - that was that about nonexisting channel.@thangngoc89 commented on GitHub (Mar 9, 2015):
@wodCZ Thanks you. Let's me try it
@thangngoc89 commented on GitHub (Mar 9, 2015):
@wodCZ now it works. I have no idea why it is?
I will push this to production server and hoping. ......
@wodCZ commented on GitHub (Mar 9, 2015):
@thangngoc89 maybe some cache or whatever :)
@thangngoc89 commented on GitHub (Mar 9, 2015):
@wodCZ Yeah. Maybe. But anyway. Yeah
@mprandot commented on GitHub (Jul 27, 2016):
where is 'api-key'? i can't find in slack documentation! 👎
@fhusquinet commented on GitHub (Jul 29, 2016):
@mprandot
Info about authentication is here: https://api.slack.com/web