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

Permission Denied, Laravel and Monolog -

Error in exception handler: The stream or file "/home/wwwroot/default/tor_service/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in…
ByLug
  • 11
  • 1
  • 2
0
votes
1 answer

Best Practice: Where to Add Email Error Logging in a Laravel 5 App

I have the following code in my AppServiceprovider::boot method, whcih ensures I get an email whenever anything is logged with a warning or greater severity level. $message = \Swift_Message::newInstance( 'An Error has Occurred in XXX' ) ->setTo(…
voidstate
  • 7,937
  • 4
  • 40
  • 52
0
votes
1 answer

Does PHP Monolog catch messages that would otherwise go to /var/log?

I'm trying to figure out if Monolog is meant to be a replacement for Nginx and Apache logs. So if I use Monolog, which I am in Laravel, would I still need to set the following configuration parameters: Nginx: access_log…
angelcool.net
  • 2,505
  • 1
  • 24
  • 26
0
votes
1 answer

Limit line length with monolog

I'm using monolog to log API requests. Some of those log messages include fairly large payloads. I would like to keep the general verbosity, but cut off all lines at 300 characters. Is it possible to configure monolog accordingly?
didi_X8
  • 5,018
  • 10
  • 42
  • 46
0
votes
1 answer

CodeIgniter 3 - library replacement

Tried to implement Monolog into a CodeIgniter 3 base installation, and implemented as per the instructions here: https://github.com/stevethomas/codeigniter-monolog, but for some reason CI 3 does not replace the built-in system CI_Log library. I have…
Kobus Myburgh
  • 1,114
  • 1
  • 17
  • 46
0
votes
2 answers

Monolog in Firebug is not working.

I am trying to do a simple test with Firebug in Mozilla, however it is not working, nothing appear in the firebug console. This my code: public function index() { $monolog = \Log::getMonolog(); $items = ['Pack luggage', 'Go to airport',…
Jorge Luis Jiménez
  • 1,203
  • 13
  • 20
0
votes
1 answer

Laravel 4 Log::listen confuses a for loop

First of all, I'm sorry for the complicated title, but I couldn't find any other suitable titles to represent the error. I'm using Laravel 4 for my project. I have a Log::listen in my global.php file. Log::listen(function($level, $message,…
yenerunver
  • 416
  • 1
  • 5
  • 26
0
votes
1 answer

Monolog in Symfony from non-controller Class

I have the following class: namespace AppBundle\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use FOS\UserBundle\Event\UserEvent; use FOS\UserBundle\FOSUserEvents; use FOS\UserBundle\Event\FormEvent; class…
Chris
  • 2,166
  • 1
  • 24
  • 37
0
votes
1 answer

configure a regex path in yaml to exclude exceptions

In monolog you can exclude path so that when an exception happens it doesn't get logged into prod.log I wanted to exclude all logs from /items/* so I did the following: monolog: handlers: main: type: fingers_crossed …
adit
  • 32,574
  • 72
  • 229
  • 373
0
votes
2 answers

How to override Monolog core handler?

In symfony 2.5.9, I try to override SwiftMailerHandler of Monolog class MySwiftMailerHandler extends SwiftMailerHandler { public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) { …
acubens
  • 472
  • 1
  • 8
  • 17
0
votes
1 answer

Custom monolog in order to perform extra actions

Helo people, In my project, sometimes I need to send emails and log messages. The thing is that I'm not using swift mailer, I'm using an API that takes care of sending emails for me. The solution I've tried is that I created a custom processor where…
smarber
  • 4,829
  • 7
  • 37
  • 78
0
votes
0 answers

symfony2.3 spool monolog error email in command

I know that this question was already made in this post: Send email when error occurs in console command of Symfony2 app, but answers do not provide a complete solution to the problem at hand and I can't comment on original post. I need to send a…
Matteo Rossi
  • 443
  • 5
  • 12
0
votes
0 answers

How to build complex log structure using monolog?

For every log event i have 'type' field. I want my log folder structure to be like: Event_type (directory) ..Date (YY.MM.DD) (sub directory) ....Hour (HH) (sub directory) ......yy.mm.dd_hh.mm.ss_event_type.log (log file) Is it possible to do log…
scifi
  • 23
  • 1
  • 5
0
votes
1 answer

Symfony2 ConsoleExceptionListener ConsoleExceptionEvent get Arguments and Options

I have implemented a console exception listener exactly as explained in http://symfony.com/doc/current/cookbook/console/logging.html#enabling-automatic-exceptions-logging it works as expected. But I have some cronjobs that execute some commands…
felipep
  • 2,442
  • 1
  • 28
  • 35
0
votes
1 answer

How to use php monolog

I've heard a lot about monolog(https://github.com/Seldaek/monolog) & trying to use that in one of our app. But, can't able to fig. out how to use that. Don't know it's I'm only can't able to get any documentation of it or really it has no…
Suresh
  • 5,687
  • 12
  • 51
  • 80