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
Symfony2 dev.log since weeks I'm seeing this php.INFO lines
php.INFO: The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setMethods() method instead.…

Martin Fasani
- 825
- 7
- 20
0
votes
1 answer
What is the reason behind Monolog handlers handling triggering internally?
Most standard Monolog (https://github.com/Seldaek/monolog/tree/master/src/Monolog) handlers handle their triggering internally, for example:
// https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/PHPConsoleHandler.php#L76
public…

nehalist
- 1,434
- 18
- 45
0
votes
1 answer
Symfony 2 - Don't pass logging to next handler
I've defined a service to handle logging of records with specific text (e.g. "matched route" and such). I'm successfully writing those records out to a separate file.
However, what I want to avoid is writing them a second time to the primary log…

Carl Anderson
- 1
- 1
0
votes
1 answer
Monolog in Silex application
I try to use Monolog in my Silex application, according to the doc
http://silex.sensiolabs.org/doc/master/providers/monolog.html
I declare MonologServiceProvider in the app.php file as follow:
use…

Macbernie
- 1,303
- 6
- 24
- 48
0
votes
1 answer
Symfony Command tapped in monolog
I created a custom command. I want to log with monolog the command tapped by user with arguments and options
For exemple: php bin/console app:my_command argument1 --option=1234
Now I have that :
$this->log->error('error on command', array(
…

Xero
- 3,951
- 4
- 41
- 73
0
votes
1 answer
Monolog email not received: how to debug
Exception email sent by Monolog at a shared host are not received when using a cloud host. Host is an Azure Ubuntu 16 VM. sendmail is installed on the VM and test emails are received. parameters.yml at the VM contain the same mailer_... parameters…

geoB
- 4,578
- 5
- 37
- 70
0
votes
0 answers
How to use custom HandlerWrapper for Monolog in Symfony config.yml?
I would like to create a custom HandlerWrapper to use it with Monolog in my Symfony 2.8 project.
The goal is to use this CustomHandler as a filter that decides wether the wrapped/nested handler is called or not.
==============
UPDATE: The following…

Andrei Herford
- 17,570
- 19
- 91
- 225
0
votes
0 answers
How to stop Monolog processing using a custom handler?
I am using Monolog in a Symfony 2.8 project. I have configured a mail handler to send me notification about all errors.
Since not all errors are important (e.g. PageNotFound for /apple-app-site-association) I would like to add a filter. I did this…

Andrei Herford
- 17,570
- 19
- 91
- 225
0
votes
1 answer
console command: log data to a specyfic file (Symfony3 and monolog)
I have a console command as a service.
I would like to log, that the command was executed in a log file called foo.log - and no other logs to be placed there.
I have almost done it, but:
in case A, I get all logs to my specyfic file (not only the…

Anna
- 43
- 6
0
votes
1 answer
Symfony and Monolog - how to make it send everything below WARNING level to stdout and everything else to stderr
While using monolog in Symfony's console commands all messages are being outputed to stderr. How to configure monolog make it send everything below WARNING level to stdout and everything else to stderr?

Xander
- 1,114
- 2
- 9
- 18
0
votes
2 answers
Filter Monolog entries from different process
I have two PHP scripts. The first script (e.g. local.php) executes the second one (e.g. remote.php) via SSH using the phpseclib.
Both scripts are using Monolog to write logs to the console.
Now my problem: How can I filter the log entries from the…

Programie
- 141
- 6
0
votes
1 answer
Error Symfony 3 with Monolog & swift mailer
I have a problem with swift mailer and monolog on Symfony 3.0.2:
FatalThrowableError in appDevDebugProjectContainer.php line 4963:
Type error: Argument 1 passed to…

Romain
- 1
- 2
0
votes
1 answer
Symfony Monolog rewrites the same file
I have my service with Monolog:
cmd_local.logger:
class: Symfony\Bridge\Monolog\Logger
arguments: [app]
calls:
- [pushHandler, [@cmd_local.logger_handler]]
cmd_local.logger_handler:
class: …

Isky
- 1,328
- 2
- 14
- 33
0
votes
1 answer
How to parse my logs in Symfony2 (Monolog\Logger)
I use Monolog\Logger in a service like this :

Gazelle
- 11
- 5
0
votes
2 answers
Configuring monolog in Symfony2
I'm trying to optimize my project logs (Because my log got 3Gb at now) so that when something goes wrong the server send me an email with the details of the error.
I would like to appear in the log only major errors, such as 500 errors, errors that…

Borja Pombo
- 525
- 1
- 7
- 30