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
Symfony 2's NelmioSolariumBundle and issues with Monolog
I'm trying install NelmioSolariumBundle with my Symfony 2 application by following the read me, however after registering the bundle within the AppKernal.php I receive` the following error:
ErrorException: Catchable Fatal Error: Argument 1 passed to…

Joseph Woodward
- 9,191
- 5
- 44
- 63
0
votes
3 answers
Where should I place my Monolog custom Handler in my Symfony2 project?
I have created a handler class that derives from AbstractProcessingHandler. I've seen that I can put it in src/MyNamespace/MyBundle/Monolog/, but it worries me a bit because this handler is used in several others bundles where I log data. So the…

Swergas
- 362
- 4
- 9
0
votes
1 answer
Symfony2: Email error not send
I put my project on production server and try send email on error using this guide
http://symfony.com/doc/current/cookbook/logging/monolog_email.html
Simple email normal pass from server by SwiftMailer, but error emails not send.
I try set…

Ivan1986
- 3
- 3
0
votes
1 answer
Cannot use base Silex logger
I have this simple code:
get('/hello', function() { return 'Hello!'; });
//$app->register(new Silex\Provider\MonologServiceProvider(), array(
// …

Alain
- 1,450
- 3
- 20
- 37
0
votes
2 answers
How to log to a different file inside a Command?
I'm creating a custom command, and I want to use a different log file.
In the docs it says that I have to tag my service. But my custom command isn't a service, is it? Should I make it a service?

ChocoDeveloper
- 14,160
- 26
- 79
- 117
0
votes
1 answer
FOSUserBundle is querying twice to get the User
Check out lines #2 and #3 starting from bottom:
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11…

ChocoDeveloper
- 14,160
- 26
- 79
- 117
0
votes
1 answer
Symfony 2 + GELF
I'm trying to set up Symfony 2 with GELF to be used with GrayLog. I am on Symfony 2.0.17 and using the information from this GIST https://gist.github.com/2654837 I have set the logging to DEBUG mode and am not receiving and information in…

Daniel
- 541
- 2
- 5
- 16
0
votes
1 answer
Using custom logger service in AuthenticationHandler class in Symfony2
In brief I am trying to use a logger service that I defined inside a custom handler service.
My config.yml
services:
authentication_handler:
class: Panasonic\LoginBundle\Handler\AuthenticationHandler
arguments: [ @custom_logger…

Rishi
- 667
- 1
- 6
- 13
0
votes
1 answer
Get access to silex $app in custom Exception constructor?
I would like to use set of custom Exception classes in my project based on silex (silex.sensiolabs.org) framework. I prefer to write an error message into log file in function "__construct". Is there a way to access to $app['monolog'] inside…

Algis
- 312
- 4
- 14
0
votes
1 answer
Symfony 2: Disable Monolog
Is it possible to disable core bundles of Symfony 2, such as the Monolog logger?
I am working on an application which doesn't have many fancy requirements except that it should be ultra fast and as much lightweight as possible. I guess Symfony 2 is…

Tony Bogdanov
- 7,436
- 10
- 49
- 80
-1
votes
1 answer
Why Symfony dies with a 500 error without Monolog writing anything to the log file?
I'm attempting to have more information on production when my site errors out. The scenario is this:
We integrate with stripe, and stripe webhooks to do certain calls. When a stripe function fails, we don't have any information to understand what…

Majo0od
- 2,278
- 10
- 33
- 58
-1
votes
1 answer
How to assert if a phpunit test writes a certain log entry / how to assert if emails are sent
I have a service class in my symfony5 project on php8, which is sending emails following certain rules. With my test want to check if the correct mails are sent. This task exists for several projects, so I really want to find a solution for…

Calamity Jane
- 2,189
- 5
- 36
- 68
-1
votes
1 answer
Best way to pass/use debugging class in PHP libraries
I usually use Monolog for my PHP logging and debugging, but have found I end up with each of my classes instantiating there own Monolog\Logger, which is fine for a project with just one or two classes in it, but I want to share these classes across…

Marl
- 169
- 1
- 7
-1
votes
2 answers
How to log if data has been send to database
I'm using Laravel 5.7 and know about the Monolog package.
My question now is, since I haven't found a proper tutorial on correctly logging your data, how do I properly log if the user input, converted into an array, is sent to the database?
The…

ofmiceandmoon
- 548
- 2
- 9
- 30
-1
votes
1 answer
Exception installing monolog in composer
I tried to install monolog/monolog with composer composer require monolog/monolog on my Ubuntu but I got this error :
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
pathToMyProject/vendor/psr/log…

johannchopin
- 13,720
- 10
- 55
- 101