Monolog is a logging library for PHP 5.3 used by Symfony2. It is inspired by the Python LogBook library.
Questions tagged [monolog]
514 questions
0
votes
1 answer
Writing (Mono)logs to different database tables
I'm currently logging all interactions to my database (added user, updated user, ...) in one table.
An example from my userService:
public function addUserAction()
{
$this->logger->alert("Added user!");
// Code that adds the user to the…

mattyh88
- 1,585
- 5
- 26
- 48
0
votes
1 answer
Understand Symfony Error Logging
I 've set up my application to send my an email upon error with monolog so I've got some mails and try to confugure what the error was. There was lots of mails with the same error:
event.DEBUG: Notified event "kernel.response" to listener…

iiirxs
- 4,493
- 2
- 20
- 35
0
votes
1 answer
only log certain logs with monolog using a channel in symfony
I'm having a hard time understanding how to configure logging in my symfony app to do what i need to. I don't understand the difference/relationship between handlers and channels. I have the following in my config.yml
monolog:
handlers:
…

David
- 10,418
- 17
- 72
- 122
0
votes
2 answers
Custom Error Logging in Laravel - Using different files for different error types
I am using laravel 4 for my project. I would like to log different kind of error to different files. For example, I am using PayPal to accept payments. Any error during payment processing, I will like to log to a different file (other than generic…

Vikalp Jain
- 583
- 2
- 11
- 25
0
votes
1 answer
Monolog Couldn't find constant Monolog\Logger::DEBUGS
I keep getting an error with the MonologBundle for Symfony2:
Monolog\Logger::DEBUGS in /foo/vendor/symfony/monolog-bundle/Symfony/Bundle/MonologBundle/DependencyInjection/MonologExtension.php on line 119
It only happens in prod and happens only…

Thomas K
- 6,076
- 5
- 39
- 56
0
votes
1 answer
symfony2 exceptions without logging
There are several places in my application where I throw an exception as part of the business logic, but I don't need Symfony2 to generate and log an exception.
For example, when the user attempts an action he can't do temporarily, I call…

Tom
- 2,688
- 3
- 29
- 53
0
votes
1 answer
How to Do custom error log in laravel 4
I am using this code for logging the error in L4
$logFile = 'log-' . php_sapi_name() . '.txt';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
App::error(function(Exception $exception, $code) {
…

Kapil Gupta
- 81
- 1
- 10
0
votes
1 answer
Can Laravel 4 maintain log errors to socket?
If so how can it be done? By default Laravel 4 writes to a text file. I notice that Monolog can Log to Database on its github page. I have tried with this. But rather than storing in database its better to store error log on socket. So can you…

Eswara Reddy
- 1,617
- 1
- 18
- 28
0
votes
2 answers
Interface 'Psr\Log\LoggerInterface' not found in /opt/lampp/vhosts/development.com/htdocs/test/Monolog/Logger.php
I am trying to execute basic example of monolog. I have tried follwing code.
My index.php file is

Eswara Reddy
- 1,617
- 1
- 18
- 28
0
votes
2 answers
Symfony2: Circular reference exception - Monolog & custom exception handler
In an attempt to combine Monolog e-mailing errors with a custom exception handler I get the following:
[Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException]
Circular reference detected for service "router", path:…

geoB
- 4,578
- 5
- 37
- 70
0
votes
1 answer
Graylog2 not showing any messages in specific stream
In our Symfony2 application we query an external API for a certain service we provide. This API (let's call it Acme API) sometimes throws error messages that we forward to Graylog2 via Monolog and Gelf to keep track of outages. Every error is logged…

thormeier
- 672
- 9
- 25
0
votes
1 answer
Monolog and Symfony Class Loader
Monolog : http://github.com/Seldaek/monolog
Symfony Class Loader : https://github.com/symfony/ClassLoader
As per the usage instructions on the Monolog site, I'm trying to load the class loader to load monolog in my php project. I cant get…

Ninjanoel
- 2,864
- 4
- 33
- 53
0
votes
0 answers
Using Monolog within Doctrine document into SF2 applications
Since you can't inject SF2 services into a Doctrine document, how do you write a log (using monolog) from a document?

David
- 2,603
- 4
- 18
- 28
0
votes
1 answer
Symfony2 - Monolog - Level up or down customized logger
Using Symfon2 and its Monolog framework to for logging, I am having some trouble.
On the one hand, I have a service configured with my own logger. It is working properly and I get to "info" and "err" messages without problems.
services:
…

ElPiter
- 4,046
- 9
- 51
- 80
0
votes
1 answer
Use Monolog in my namespace
I want to integrate Monolog logger (https://github.com/Seldaek/monolog) to my own framework
I have followed the PSR0 standard for structuring my framework so that namespacing is easy an follows the directory structure
Now, I would like the logging…

Thomas
- 4,641
- 13
- 44
- 67