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


PHP Logging::logException方法代码示例

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


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

示例1: onResponseSent

 public function onResponseSent()
 {
     if (!$this->settings->hasSetting("debug_log") or !$this->environment->request()) {
         return;
     }
     $path = $this->environment->request()->path();
     if (count($path) > 0 and strcasecmp($path[0], "debug") == 0) {
         return;
     }
     $log = $this->settings->setting("debug_log");
     $handle = @fopen($log, "a");
     if (!$handle) {
         Logging::logError("Could not write to log file: " . $log);
         return;
     }
     $trace = Logging::getTrace();
     try {
         foreach ($trace as $d) {
             fwrite($handle, Util::toString($d));
         }
         fclose($handle);
     } catch (Exception $e) {
         Logging::logError("Could not write to log file: " . $log);
         Logging::logException($e);
     }
 }
开发者ID:Zveroloff,项目名称:kloudspeaker,代码行数:26,代码来源:KloudspeakerBackend.class.php

示例2: globalExceptionHandler

function globalExceptionHandler($e)
{
    global $responseHandler;
    Logging::logException($e);
    Logging::logDebug(Util::array2str(debug_backtrace()));
    if ($responseHandler == NULL) {
        $responseHandler = new ResponseHandler(new OutputHandler());
    }
    $responseHandler->unknownServerError($e->getMessage());
    die;
}
开发者ID:kumarsivarajan,项目名称:mollify,代码行数:11,代码来源:r.php

示例3: onError

 public function onError($e)
 {
     Logging::logException($e);
 }
开发者ID:kumarsivarajan,项目名称:mollify,代码行数:4,代码来源:MollifyInstallProcessor.class.php

示例4: put

 public function put($data)
 {
     if ($data == NULL) {
         Logging::logDebug("Ignoring empty update");
         return;
     }
     checkUploadSize();
     $oldSize = $this->file->exists() ? $this->file->size() : NULL;
     $size = isset($_SERVER['CONTENT_LENGTH']) ? $_SERVER['CONTENT_LENGTH'] : NULL;
     Logging::logDebug("Update " . $size);
     if ($size == 0) {
         Logging::logDebug("Ignoring empty update");
         return;
     }
     try {
         $this->env->filesystem()->updateFileContents($this->file, $data, $size);
     } catch (Exception $e) {
         Logging::logException($e);
         if ($oldSize != 0 and $this->env->request()->isWindowsClient()) {
             // windows tries to clean up interrupted overwrite
             // for existing files this is not acceptable, ignore later delete request
             Logging::logDebug("File update failed, marking delete ignore");
             $this->env->session()->setValue("ignore_delete_" . $this->file->id(), "" . time());
         }
         throw new Sabre_DAV_Exception_Forbidden();
     }
 }
开发者ID:ThreeMcc,项目名称:kloudspeaker,代码行数:27,代码来源:kloudspeaker_dav.php

示例5: catch

    $env->authentication()->setAuth($user);
}
$command = $opts["commands"][0];
if (!$env->commands()->exists($command)) {
    echo "Invalid command: " . $command . "\n";
    return;
}
echo "Command [" . $command . "]\n";
//TODO allow command registrations from plugins etc
try {
    $env->commands()->execute($command, $options);
} catch (ServiceException $e) {
    Logging::logException($e);
    echo "ERROR: " . $e->type() . " " . $e->details() . " (" . Util::array2str($e->data()) . ")\n";
} catch (Exception $e) {
    Logging::logException($e);
    echo "ERROR: " . $e->getMessage() . "\n";
}
// TOOLS
function getOpts($args)
{
    array_shift($args);
    $endofoptions = false;
    $ret = array('commands' => array(), 'options' => array(), 'flags' => array(), 'arguments' => array());
    while ($arg = array_shift($args)) {
        // if we have reached end of options,
        //we cast all remaining argvs as arguments
        if ($endofoptions) {
            $ret['arguments'][] = $arg;
            continue;
        }
开发者ID:Zveroloff,项目名称:kloudspeaker,代码行数:31,代码来源:cmd.php


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