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 "deduplication" log hanlder not found
I am using sample config from symfony documentation page to send logs via email https://symfony.com/doc/2.8/logging/monolog_email.html
monolog:
handlers:
main:
type: fingers_crossed
# 500 errors are logged at the critical…
0
votes
1 answer
PHP Monolog as Logger Only Prints Info Level
I have an class that I autoload through composer to all my other classes:
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
class LogStreamer
{
protected static $instance;
public static function getLogger()
{
if(!…

user3081519
- 2,659
- 5
- 25
- 35
0
votes
1 answer
How to specify Person Function for Rollbar logger in Symfony 4?
In configuring the Rollbar Monolog configuration, one of the options that can be set is the person_fn function. That configuration Rollbar is expecting to be some sort of "callable", which when called will return information about the user.
In order…

MidnightLightning
- 6,715
- 5
- 44
- 68
0
votes
1 answer
Custom log development in laravel 5.6
I'm trying to make a custom Log using the channels of the new laravel version 5.6, but I'm not able to implement it. I have installed the recent version of monolog. How can I save records in my MongoDB bank using MongoDBHandler's monolog.
I'm trying…

Diego Lisboa
- 1
- 1
0
votes
1 answer
Symfony3 Monolog Settings for email and file logging
I work on two different projects based on symfony2.x and symfony 3.x.
I want to setup both projects to send me an email for critical errors, but just log error-level errors.
The following setting works on symfony 2.8 but not on…

Shahid
- 357
- 5
- 12
0
votes
1 answer
monolog configuration in symfony and customization
I am working on a web app built using Symfony 2.6 and there are different configuration inside app/config folder. How do I know which one is being used.
Inside app/config I see config.yml config_dev.yml config_prod.yml and the monolog entry I see in…

Manojkumar
- 1,351
- 5
- 35
- 63
0
votes
1 answer
How to send error log through email with laravel 5.6 and monolog
In laravel 5.6 documentation it says You can use a different driver from the defaults when You create a log
Creating Monolog Handler Channels
So I tried the following in the config/logging.php file
'channels' => [
'stack' => [
'driver'…

Omar Sanchez
- 165
- 4
- 12
0
votes
2 answers
Laravel 5.6 Monolog to output in Chrome console
I recently switched from Laravel 5.5 to 5.6
Everything's working fine except I can't seem to get logging to the Chrome console to work.
I used to do this in AppServiceProvider.php
$monolog = Log::getMonolog();
if (config('app.env') ===…

Kirk Olson
- 554
- 8
- 16
0
votes
0 answers
Symfony3 amendment of the logger convention
Welcome,
My task is to change the convention of loggers in the application. Currently, loggers are configured as dedicated services. I would like to define the loggers in the Symfony convention and ensure backward compatibility by defining DI…

rad11
- 1,561
- 3
- 15
- 30
0
votes
2 answers
Delete entry from laravel.log
I am building application on laravel. Now application itself should PCI DSS compliant. Hence we can't store card details on file.Now we don't store details anywhere itself.But when request hits at server.Then laravel logs that information into…

Sachin Sharma
- 407
- 5
- 20
0
votes
1 answer
500 Error when testing monlog package
I'm trying to test out the monolog package using composer (full disclosure: this is my first try using composer) and am getting a 500 error when running this code:

RossW
- 215
- 1
- 7
- 16
0
votes
1 answer
Clean Logging when using Monolog?
I want to use Monolog to log some info.
This is my code:
// Create the logger
$logger = new Monolog\Logger('my_logger');
$path = storage_path('app/logs/mc.log');
$logger->pushHandler(new Monolog\Handler\StreamHandler($path,…

Adam
- 25,960
- 22
- 158
- 247
0
votes
1 answer
Symfony 3.4 Daily logger
How can I config monolog, to save my logger in "daily logs". Now it saves according to the environment. How can I add date to path?
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"

pierzcha
- 11
- 3
0
votes
0 answers
limit log file and create a new one in php slim3 monolog
I am using slim3 with monolog from composer
my dependencies is looks like that:
// monolog
$container['logger'] = function ($c) {
$settings = $c->get('settings')['logger'];
$logger = new Monolog\Logger($settings['name']);
…

Tuz
- 1,810
- 5
- 29
- 58
0
votes
0 answers
PHP: How to set timezone correctly?
I want to use Laravel to develop an API for my app, and had installed the Homestead, but when I use command "php artisan make:model test"
the following warning is displayed:
PHP Warning: date_default_timezone_get(): It is not safe to rely on
the…

AlenLee
- 9
- 4