當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Writer::useDailyFiles方法代碼示例

本文整理匯總了PHP中Illuminate\Log\Writer::useDailyFiles方法的典型用法代碼示例。如果您正苦於以下問題:PHP Writer::useDailyFiles方法的具體用法?PHP Writer::useDailyFiles怎麽用?PHP Writer::useDailyFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Log\Writer的用法示例。


在下文中一共展示了Writer::useDailyFiles方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: useDailyFiles

 public function useDailyFiles($path, $days = 0, $level = 'debug')
 {
     if (Config::get('app.sae')) {
         return $this->useSaeLog($level);
     }
     parent::useDailyFiles($path, $days, $level);
 }
開發者ID:chekun,項目名稱:laravel4sae,代碼行數:7,代碼來源:Writer.php

示例2: configureSeparateWriter

 /**
  * 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'));
     }
 }
開發者ID:czim,項目名稱:laravel-cms-core,代碼行數:15,代碼來源:LogServiceProvider.php

示例3: bootstrap

 /**
  * 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'];
     });
 }
開發者ID:bitbitdecker,項目名稱:bitcoin-faucet-rotator,代碼行數:22,代碼來源:ConfigureLogging.php

示例4: useDailyFiles

 /**
  * 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);
 }
開發者ID:satriashp,項目名稱:tour,代碼行數:13,代碼來源:_ide_helper.php

示例5: configureDailyHandler

 /**
  * 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));
 }
開發者ID:sapwoo,項目名稱:portfolio,代碼行數:11,代碼來源:ConfigureLogging.php

示例6: configureDailyHandler

 /**
  * @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'));
 }
開發者ID:notadd,項目名稱:framework,代碼行數:12,代碼來源:ConfigureLogging.php

示例7: configureDailyHandler

 /**
  * 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);
 }
開發者ID:HarveyCheng,項目名稱:myblog,代碼行數:11,代碼來源:ConfigureLogging.php

示例8: configureDailyHandler

 /**
  * 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));
 }
開發者ID:laradic-old,項目名稱:illuminate,代碼行數:12,代碼來源:ConfigureLogging.php

示例9: configureDailyHandler

 /**
  * 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));
 }
開發者ID:arasmit2453,項目名稱:deployer,代碼行數:12,代碼來源:ConfigureLogging.php

示例10: configureDailyHandler

 /**
  * 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());
 }
開發者ID:bryanashley,項目名稱:framework,代碼行數:10,代碼來源:LogServiceProvider.php


注:本文中的Illuminate\Log\Writer::useDailyFiles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。