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 this. The method, which collects the receiver of the mails is currently private and you
Tag: monolog
Saving command logger output to log file and console
I wrote a very simple test command which has LoggerInterface injected in its constructor. How am I suppose to change the monolog.yaml configuration to save this logger output to both log file and to output it to console? Answer The commands will always stderr by default (if you specify the -vvv option) If you need to write the logs in
Response logging in AWS PHP SDK v3
In v2 of the AWS PHP SDK, I was able to setup logging of request and response information by simply doing this: In v3, I cannot seem to find the solution. Middlewares do not seem helpful as they only fire before the request is sent, and thus I cannot access the response HTTP code. Guzzle v6 has this feature built
How to get Doctrine to log queries in Symfony2
I’m pretty new to Symfony2, and I’m looking for a way to log SQL queries (including timings) to the same log file as the rest of my application. From what I can determine from the documentation this should all work out of the box, but after a few hours of trying I can’t figure out what I’m doing wrong. config_dev.yml
PHP: How to use monolog to log to console (php://out)?
I just switched to monolog and wanted to log my message to the PHP console instead of a file. This might seem obvious for some people, but it took me a little while to figure out how to do that and I …
Monolog FingersCrossedHandler
I am looking into using monolog in an application I am working on but I am unsure whether I would be able to implement what I require using the FingersCrosedHandler. I would like to only log DEBUG …