Skip to content

Commit

Permalink
Update Application.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dstretton authored Feb 25, 2019
1 parent 677c220 commit bb6f1f0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/A1comms/GaeSupportLaravel/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,18 @@ public function __construct($basePath = null)
$monolog->pushHandler(new PsrHandler($logging->psrLogger('app', ['batchEnabled' => true])));
});
} else {
$this->configureMonologUsing(function ($monolog) {
$handler = new StreamHandler($this->storagePath('logs/lumen.log'));
$handler->setFormatter(new \Monolog\Formatter\LineFormatter(null, null, true, true));
$monolog->pushHandler($handler);
});
// write errors to command line when running command line commands
if ($this->runningInConsole()) {
$this->configureMonologUsing(function($monolog) {
$monolog->pushHandler(new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::INFO, false)); // false value as third argument to disable bubbling up the stack
});
} else {
$this->configureMonologUsing(function ($monolog) {
$handler = new StreamHandler($this->storagePath('logs/lumen.log'));
$handler->setFormatter(new \Monolog\Formatter\LineFormatter(null, null, true, true));
$monolog->pushHandler($handler);
});
}
}

$this->replaceDefaultSymfonyLineDumpers();
Expand Down

0 comments on commit bb6f1f0

Please sign in to comment.