Questions tagged [monolog]

Monolog is a logging library for PHP 5.3 used by Symfony2. It is inspired by the Python LogBook library.

514 questions
0
votes
1 answer

How to create channel name for monolog in controller in symfony3

I need to have separate log files. These files should be named during code working. It is possible? Or is there another solution? Thanks in advance.
0
votes
1 answer

Symfony2 monolog logger custom fields in symfony command exec

Situation: In my Symfony2.8 API, I have a custom RecordProcessor for Monolog, in which I added some convenient informations: my_api.logger.formatter: class: Monolog\Formatter\LineFormatter arguments: - "[%%datetime%%]…
bohr
  • 1,206
  • 1
  • 9
  • 11
0
votes
1 answer

Symfony 4 Beta - installing monolog then clearing cache produces a count() error

I am using the v4.0.0-BETA1 tag and when I run composer req log then php bin/console cache:clear --env=prod I get the following error messages: In BaseNode.php line 348: Invalid configuration for path "monolog.handlers.main": Warning: …
Michael Millar
  • 1,364
  • 2
  • 24
  • 46
0
votes
1 answer

How to get an email with log details when errors occur with Slim and Monolog

My website is built over Slim Framework V3, and uses Monolog. I want to get an email notification when something goes wrong on my website (any log message above Error). In other words, I want to know when a Critical, Alert or Emergency message is…
Gabriel Bourgault
  • 842
  • 11
  • 22
0
votes
1 answer

log all messages and email only errors with monolog Symfony

i want to log all messages to log file but send email only in case of errors excluding 404. i use this code which works fine, but it does not make sense to me, because this code means that the main handler won't be triggered only if error level is…
ZeSoft
  • 305
  • 2
  • 4
  • 13
0
votes
0 answers

Sending log emails with monolog

I'm so lost right now. I'm trying to send an email of my logs via Amazon SES. I got that working, but I can't figure out how to send the log data?! Now I'm trying to take a few steps back and just send the email via monolog's SwiftMailerHandler, as…
MortiestMorty
  • 635
  • 1
  • 5
  • 13
0
votes
2 answers

How to use monolog in slim 3?

In my app.php file: use Monolog\Logger; use Monolog\Handler\StreamHandler; class App extends \DI\Brifge\Slim\app { public function configureContainer(ContainerBuilder $builder) { $dependencies = [ 'logger' => function (Container…
Ayush28
  • 359
  • 3
  • 18
0
votes
0 answers

Extract monolog entries

I'm using Symony 3.3 and Monolog as application logger. All services are using the injected logger. For example: public function __construct(LoggerInterface $logger) { $this->logger = $logger; } public function work() { …
user3429660
  • 2,420
  • 4
  • 25
  • 41
0
votes
1 answer

Catch using of Monolog\Logger methods

I need to add some action, when application runs one of Monolog\Logger methods (info, error, warning etc.) and do some custom code. for example: $this->logger->error('Some error'); should do error output - basic action for Monolog\Logger, but after…
Alexey Samara
  • 131
  • 1
  • 13
0
votes
1 answer

How to store log messages to specific log file using symfony2

I am new to symfony2, how to store log messages to specific file i read the documentation but i am not understanding please help me any one i configured my config.yml file is: # app/config/config.yml monolog: handlers: filter_for_errors: …
somesh
  • 528
  • 2
  • 10
  • 26
0
votes
1 answer

How to parse embedded json on part of the log in fluentd (kubernetes)?

I'm new to fluentd. I'm running some php symfony apps in kubernetes and I would like fluentd to parse specific messages including json subfields. A docker log looks like in the file: {"log":"[22-May-2017 09:46:13] WARNING: [pool www] child 18 said…
0
votes
0 answers

Symfony SPAM log with 404

I have encounter the following issue: my symfony application keeps spamming the log with request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET When no route is found. I have…
Jan Tajovsky
  • 1,162
  • 2
  • 13
  • 34
0
votes
1 answer

How to extend laravel logger?

I have created different files for different level of logging e.g Log::info, Log::error etc. Now I also want to send a message to slack only if an error comes. I have done this too by writing following code in…
Dhruv Pahuja
  • 105
  • 1
  • 10
0
votes
1 answer

Set up monolog to use rollbar with symfony3?

config.yml handlers: rollbar: type: stream token: '%rollbar.token%' level: warning bubble: true config: environment: '%rollbar.environment%' main: …
jim smith
  • 2,394
  • 5
  • 29
  • 35
0
votes
0 answers

How to do grouping in Rollbar using monolog handler?

I am using Monolog handler in Yii framework to capture errors in Rollbar. Now I need to introduce grouping feature in Rollbar to my code. Since I am using Monolog, I cannot do it by passing the parameter. Instead I need to search some other way.…