public function useDailyFiles($path, $days = 0, $level = 'debug') { if (Config::get('app.sae')) { return $this->useSaeLog($level); } parent::useDailyFiles($path, $days, $level); }
/** * Configures log writer for logging to files separately from the application. * * @param Writer $writer */ protected function configureSeparateWriter(Writer $writer) { $path = 'logs/' . ltrim($this->getCore()->config('log.file', 'cms'), '/'); if ($this->getCore()->config('log.daily')) { $writer->useDailyFiles(storage_path($path), (int) $this->getCore()->config('log.max_files')); } foreach ($writer->getMonolog()->getHandlers() as $handler) { $handler->setLevel($this->getCore()->config('log.threshold')); } }
/** * Bootstrap the given application. * * @param \Illuminate\Contracts\Foundation\Application $app * @return void */ public function bootstrap(Application $app) { $logger = new Writer(new Monolog($app->environment()), $app['events']); // Daily files are better for production stuff $logger->useDailyFiles(storage_path('/logs/laravel.log')); $app->instance('log', $logger); // Next we will bind the a Closure to resolve the PSR logger implementation // as this will grant us the ability to be interoperable with many other // libraries which are able to utilize the PSR standardized interface. $app->bind('Psr\\Log\\LoggerInterface', function ($app) { return $app['log']->getMonolog(); }); $app->bind('Illuminate\\Contracts\\Logging\\Log', function ($app) { return $app['log']; }); }
/** * Register a daily file log handler. * * @param string $path * @param int $days * @param string $level * @return void * @static */ public static function useDailyFiles($path, $days = 0, $level = 'debug') { \Illuminate\Log\Writer::useDailyFiles($path, $days, $level); }
/** * Configure the Monolog handlers for the application. * * @param \Illuminate\Contracts\Foundation\Application $app * @param \Illuminate\Log\Writer $log * @return void */ protected function configureDailyHandler(Application $app, Writer $log) { $log->useDailyFiles($app->storagePath() . '/logs/laravel.log', $app->make('config')->get('app.log_max_files', 5)); }
/** * @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $app * @param \Illuminate\Log\Writer $log * * @return void */ protected function configureDailyHandler(Application $app, Writer $log) { $config = $app->make('config'); $maxFiles = $config->get('app.log_max_files'); $log->useDailyFiles($app->storagePath() . '/logs/laravel.log', is_null($maxFiles) ? 5 : $maxFiles, $config->get('app.log_level', 'debug')); }
/** * Configure the Monolog handlers for the application. * * @param \Illuminate\Contracts\Foundation\Application $app * @param \Illuminate\Log\Writer $log * @return void */ protected function configureDailyHandler(Application $app, Writer $log) { $log->useDailyFiles($app->storagePath() . '/logs/laravel.log', 5); }
/** * Configure the Monolog handlers for the application. * * @param \Illuminate\Contracts\Foundation\Application $app * @param \Illuminate\Log\Writer $log * * @return void */ protected function configureDailyHandler(Application $app, Writer $log) { $log->useDailyFiles(storage_path('logs/laravel.log'), config('app.log_max_files', 5)); }
/** * Configure the Monolog handlers for the application. * * @param \Illuminate\Contracts\Foundation\Application $app * @param \Illuminate\Log\Writer $log * @return void */ protected function configureDailyHandler(Application $app, Writer $log) { $fileName = php_sapi_name(); $log->useDailyFiles($app->storagePath() . '/logs/' . $fileName . '.log', $app->make('config')->get('app.log_max_files', 5)); }
/** * Configure the Monolog handlers for the application. * * @param \Illuminate\Log\Writer $log * @return void */ protected function configureDailyHandler(Writer $log) { $log->useDailyFiles($this->app->storagePath() . '/logs/laravel.log', $this->maxFiles(), $this->logLevel()); }