当前位置: 首页>>代码示例>>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;未经允许,请勿转载。