mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-27 00:25:50 +03:00
[GH-ISSUE #102] Can i use mysql to log monolog messages #31
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#31
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 @ghost on GitHub (Aug 13, 2012).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/102
Is there any way that i can use Monolog to send log messages to mysql database for reporting purposes.
I wantt o see whats happening on my site
@stloyd commented on GitHub (Aug 13, 2012):
This is why you SHOULD read docs first, before asking about something: https://github.com/Seldaek/monolog/blob/master/doc/extending.md
@ghost commented on GitHub (Aug 13, 2012):
I am trying as you have written . This was in my index controller
$logger->pushHandler(new LogHandler(new PDO("mysql:host=$host;dbname=$dbname", $user, $pass)));
$logger->addInfo('My logger is now ready');
But no database table is being generated. DO i need to add anything in config.yml file. Because you have not written anything more in your above pointed tutorial
@waza-ari commented on GitHub (Feb 17, 2015):
I know this issue is quite old, however it is listed quite on top of Google searches when looking for a MySQL handler for Monolog. I have implemented such a handler, it is available under the MIT license at GitHub (https://github.com/waza-ari/monolog-mysql) or through Composer (https://packagist.org/packages/wazaari/monolog-mysql).
@deondazy commented on GitHub (Apr 4, 2016):
Thank You @waza-ari