当前位置: 首页>>代码示例>>PHP>>正文


PHP Writer::useFiles方法代码示例

本文整理汇总了PHP中Illuminate\Log\Writer::useFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP Writer::useFiles方法的具体用法?PHP Writer::useFiles怎么用?PHP Writer::useFiles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Log\Writer的用法示例。


在下文中一共展示了Writer::useFiles方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: useFiles

 public function useFiles($path, $level = 'debug')
 {
     if (Config::get('app.sae')) {
         return $this->useSaeLog($level);
     }
     parent::useFiles($path, $level);
 }
开发者ID:chekun,项目名称:laravel4sae,代码行数:7,代码来源:Writer.php

示例2: loger

 function loger($level, $file, $line, $string, $ar = NULL)
 {
     // если системный level ниже notice, то при включеном KINT_DUMP, ставим уровень notice
     if ($GLOBALS['KINT_DUMP'] && $this->agiconfig['verbosity_level'] < 2) {
         $this->agiconfig['verbosity_level'] = 2;
     }
     if ($this->agiconfig['verbosity_level'] < $level) {
         return;
     }
     if ($GLOBALS['KINT_DUMP']) {
         ~d("{$level} | {$file} | {$line}");
         if (!is_null($string)) {
             d($string);
         }
         if (!is_null($ar)) {
             d($ar);
         }
         return;
     }
     if (!is_null($string)) {
         $this->agi->verbose($string);
     }
     if (!is_null($ar)) {
         $this->agi->verbose($ar);
     }
     if ((int) $this->agiconfig['logging_write_file'] === 1) {
         $logger = new Writer(new Logger('local'));
         $logger->useFiles($this->config['logs_patch']);
         if (!is_null($ar)) {
             $string .= "\n";
             $string .= var_export($string, true);
         }
         switch ($level) {
             case 'error':
                 $logger->error("[" . $this->uniqueid . "] [{$file}] [{$line}]: -- {$string}");
                 break;
             case 'warning':
                 $logger->warning("[" . $this->uniqueid . "] [{$file}] [{$line}]: -- {$string}");
                 break;
             case 'notice':
                 $logger->notice("[" . $this->uniqueid . "] [{$file}] [{$line}]: -- {$string}");
                 break;
             case 'info':
                 $logger->info("[" . $this->uniqueid . "] [{$file}] [{$line}]:  {$string}");
                 break;
             default:
                 $logger->debug("[" . $this->uniqueid . "] [{$file}] [{$line}]: {$string}");
                 break;
         }
     }
 }
开发者ID:regroute,项目名称:rr20-backend,代码行数:51,代码来源:Rr.php

示例3: notify

 /**
  * PayFast notify
  *
  * @param Request $request
  * @param Writer  $logger
  *
  * @return Response
  */
 public function notify(Request $request, Writer $logger)
 {
     //Notify Payfast
     header('HTTP/1.0 200 OK');
     flush();
     $logger->useFiles('payFast.txt');
     if ($request->method() !== 'POST') {
         $logger->error('Error -- POST variables not set');
         exit;
     }
     $logger->debug("Posted Variables --\n" . implode("\n", array_filter($request->input(), function ($value) {
         return !empty($value);
     })) . "\n");
     $payFastData = $this->cleanPostVariables($request->input());
     $serialisedPayFastData = $this->serialisePostVariables($payFastData);
     $signature = $request->input('signature');
     if ($signature === null) {
         $logger->error("Error -- Signature not set \n");
         exit;
     }
     if (!$this->hasValidSignature($signature, $serialisedPayFastData)) {
         $output = "Error -- Signature mismatch\n\n";
         $output .= "Security Signature:\n\n";
         $output .= "\t- posted     = " . $signature . "\n";
         $output .= "\t- calculated = " . $serialisedPayFastData . "\n";
         $output .= "\t- result     = " . $payFastData['payment_status'] . "\n";
         $logger->error($output);
         exit;
     }
     Transaction::create($request->input());
     if (!$this->isValidPayfastHost($request)) {
         $logger->error('Invalid PayFast IP Address');
         exit;
     }
     $pfHost = self::SANDBOX_MODE ? 'sandbox.payfast.co.za' : 'www.payfast.co.za';
     $hostUrl = 'https://' . $pfHost . '/eng/query/validate';
     if (in_array('curl', get_loaded_extensions())) {
         $response = $this->checkPaymentStatusCurl($hostUrl, $serialisedPayFastData);
     } else {
         $response = $this->checkPaymentStatusHttp($pfHost, $serialisedPayFastData);
     }
     $lines = explode("\r\n", $response);
     $verifyResult = trim($lines[0]);
     if (strcasecmp($verifyResult, 'VALID') != 0) {
         $logger->error('Error -- Data not valid');
         die;
     }
     $this->updateOrderStatus($request, $logger, $payFastData);
 }
开发者ID:jbmadking,项目名称:bottlestore,代码行数:57,代码来源:PaymentController.php

示例4: sysmessage

 public function sysmessage(Request $request, Crypt $crypt)
 {
     $logger = new Writer(new Logger("output"));
     $logger->useFiles('php://stdout');
     $raw = $GLOBALS['HTTP_RAW_POST_DATA'];
     $logger->info('raw post:');
     $logger->info(var_export($raw, true));
     $data = $this->process($raw);
     $logger->info(var_export($data, true));
     // $errCode = $crypt->decryptMsg($raw->ComponentVerifyTicket, $raw->CreateTime, $nonce, $from_xml, $msg);
     echo 'success';
     return;
     /*
     	if ($errCode == 0) {
     		$logger->info('after decrypt:');
     		$logger->info(var_export($msg, true));
     	} else {
     		$logger->info('Err: '.$errCode);
     	}
     */
     echo 'success';
 }
开发者ID:benjah1,项目名称:WechatApiTest,代码行数:22,代码来源:ReceiveController.php

示例5: useFiles

 /**
  * Register a file log handler.
  *
  * @param string $path
  * @param string $level
  * @return void 
  * @static 
  */
 public static function useFiles($path, $level = 'debug')
 {
     \Illuminate\Log\Writer::useFiles($path, $level);
 }
开发者ID:satriashp,项目名称:tour,代码行数:12,代码来源:_ide_helper.php

示例6: configureSingleHandler

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param \Illuminate\Contracts\Foundation\Application $app        	
  * @param \Illuminate\Log\Writer $log        	
  * @return void
  */
 protected function configureSingleHandler(Application $app, Writer $log)
 {
     $log->useFiles($app->storagePath() . '/logs/laravel.log');
 }
开发者ID:sapwoo,项目名称:portfolio,代码行数:11,代码来源:ConfigureLogging.php

示例7: boot

 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot(Writer $logger)
 {
     $logger->useFiles('php://stdout');
 }
开发者ID:shin1x1,项目名称:twiliojp-osaka-demo,代码行数:9,代码来源:AppServiceProvider.php

示例8: configureAppenginemvmHandler

 /**
  * Custom Monolog handler that for AppEngine ManagedVMs.
  *
  * @param  \Illuminate\Contracts\Foundation\Application $app
  * @param  \Illuminate\Log\Writer $log
  *
  * @return void
  */
 protected function configureAppenginemvmHandler(Application $app, Writer $log)
 {
     // Log to designated
     $log->useFiles($app->storagePath() . '/logs/laravel.log');
     $log->useFiles('/var/log/app_engine/custom_logs/laravel.log');
 }
开发者ID:cedricziel,项目名称:l5-appengine-mvm-loghandler,代码行数:14,代码来源:LoggingConfiguration.php

示例9: configureSingleHandler

 /**
  * @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $app
  * @param \Illuminate\Log\Writer                                                      $log
  *
  * @return void
  */
 protected function configureSingleHandler(Application $app, Writer $log)
 {
     $log->useFiles($app->storagePath() . '/logs/laravel.log', $app->make('config')->get('app.log_level', 'debug'));
 }
开发者ID:notadd,项目名称:framework,代码行数:10,代码来源:ConfigureLogging.php

示例10: function

use Illuminate\Mail\Transport\LogTransport;
use Illuminate\Filesystem\Filesystem;
use Illuminate\View\Engines\PhpEngine;
use Illuminate\View\Engines\EngineResolver;
use Illuminate\View\FileViewFinder;
use Illuminate\View\Factory;
use Illuminate\Events\Dispatcher;
use Illuminate\Mail\Mailer;
use Illuminate\Log\Writer;
use Monolog\Logger;
$app = new \Slim\Slim();
$app->add(new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware());
$app->get('/', function () {
    $logger = new Writer(new Logger('local'));
    // note: make sure log file is writable
    $logger->useFiles('../../logs/laravel.log');
    // chose a transport (SMTP, PHP Mail, Sendmail, Mailgun, Maindrill, Log)
    $transport = SmtpTransport::newInstance(getenv('SMTP_HOST'), getenv('SMTP_PORT'));
    // $transport = MailTransport::newInstance();
    // $transport = SendmailTransport::newInstance('/usr/sbin/sendmail -bs');
    // $transport = new MailgunTransport(getenv('MAILGUN_SECRET'), getenv('MAILGUN_DOMAIN'));
    // $transport = new MandrillTransport(getenv('MANDRILL_SECRET'));
    // $transport = new LogTransport($logger->getMonolog());
    // SMTP specific configuration, remove these if you're not using SMTP
    $transport->setUsername(getenv('SMTP_USERNAME'));
    $transport->setPassword(getenv('SMTP_PASSWORD'));
    $transport->setEncryption(true);
    $swift = new SwiftMailer($transport);
    $finder = new FileViewFinder(new Filesystem(), ['views']);
    $resolver = new EngineResolver();
    // determine which template engine to use
开发者ID:damiani,项目名称:IlluminateNonLaravel,代码行数:31,代码来源:index.php

示例11: configureSingleHandler

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application $app
  * @param  \Illuminate\Log\Writer                       $log
  *
  * @return void
  */
 protected function configureSingleHandler(Application $app, Writer $log)
 {
     $log->useFiles(storage_path('logs/laravel.log'));
 }
开发者ID:laradic-old,项目名称:illuminate,代码行数:12,代码来源:ConfigureLogging.php

示例12: configureSingleHandler

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application $app
  * @param  \Illuminate\Log\Writer                       $log
  * @return void
  */
 protected function configureSingleHandler(Application $app, Writer $log)
 {
     $fileName = php_sapi_name();
     $log->useFiles($app->storagePath() . '/logs/' . $fileName . '.log');
 }
开发者ID:arasmit2453,项目名称:deployer,代码行数:12,代码来源:ConfigureLogging.php

示例13: configureSingleHandler

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param  \Illuminate\Log\Writer  $log
  * @return void
  */
 protected function configureSingleHandler(Writer $log)
 {
     $log->useFiles($this->app->storagePath() . '/logs/laravel.log', $this->logLevel());
 }
开发者ID:bryanashley,项目名称:framework,代码行数:10,代码来源:LogServiceProvider.php


注:本文中的Illuminate\Log\Writer::useFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。