本文整理汇总了PHP中CLog::WriteLine方法的典型用法代码示例。如果您正苦于以下问题:PHP CLog::WriteLine方法的具体用法?PHP CLog::WriteLine怎么用?PHP CLog::WriteLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLog
的用法示例。
在下文中一共展示了CLog::WriteLine方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* @access private
* @param string $errorDesc
*/
function _setError($errorDesc, $line = null)
{
$this->_error = $this->_error ? $this->_error : $errorDesc;
$file = __FILE__;
$line = $line !== null ? ' (~' . $line . ')' : '';
$this->_log->WriteLine('WMSERVER Error: ' . $file . $line . CRLFCHARS . $errorDesc);
}
示例2: setGlobalErrorAndWriteLog
function setGlobalErrorAndWriteLog()
{
if (strlen($this->error) > 0) {
setGlobalError($this->error);
$this->_log->WriteLine('POP3 Error: ' . $this->error);
}
}
示例3:
/**
* @access private
* @param string $errorDesc
*/
function _setError($errorDesc, $line = null)
{
$this->_error = $this->_error ? $this->_error : $errorDesc;
if ($this->_log->Enabled) {
$file = __FILE__;
$line = $line !== null ? ' (~' . $line . ')' : '';
$this->_log->WriteLine('WMSERVER Error: ' . $file . $line . CRLFCHARS . $errorDesc, LOG_LEVEL_ERROR);
}
}
示例4: IsSuccess
/**
* @access private
* @param resource $link
* @param CLog $log
* @return bool
*/
function IsSuccess(&$link, &$log, &$out, $isLog = true)
{
$out = '';
$line = '';
$result = true;
do {
$line = @fgets($link, 1024);
if ($isLog) {
$log->WriteLine('[SMTP] <<: ' . trim($line));
}
if ($line === false) {
$result = false;
setGlobalError('[SMTP] Error: IsSuccess fgets error');
break;
} else {
$out .= $line;
$line = str_replace("\r", '', str_replace("\n", '', str_replace(CRLF, '', $line)));
if (substr($line, 0, 1) != '2' && substr($line, 0, 1) != '3') {
$result = false;
$error = '[SMTP] Error <<: ' . $line;
setGlobalError($error);
//setGlobalError(substr($line, 3));
break;
}
}
} while (substr($line, 3, 1) == '-');
if (!$result && $log->Enabled) {
$log->WriteLine(getGlobalError(), LOG_LEVEL_ERROR);
}
return $result;
}
示例5:
/**
* this functiuon is to send the command to server
*
* @param string $msg
* @return bool
*/
function put_line($msg = '')
{
$this->_log->WriteLine('IMAP4 >>: ' . $msg);
return @fputs($this->connection, $msg . "\r\n");
}
示例6:
/**
* @access private
* @param string $logMsg
* @return void
*/
function _error($logMsg)
{
if (!is_null($this->_logger)) {
$this->_logger->WriteLine($logMsg, LOG_LEVEL_ERROR);
}
}
示例7:
/**
* @param string $string
*/
function _log($string, $logLevel = LOG_LEVEL_DEBUG)
{
if ($this->_log->Enabled) {
$this->_log->WriteLine('XMail: ' . $string, $logLevel);
}
}
示例8: IsSuccess
/**
* @access private
* @param resource $link
* @param CLog $log
* @return bool
*/
function IsSuccess(&$link, &$log)
{
$result = true;
do {
$line = @fgets($link, 1024);
if ($line === false) {
$result = false;
setGlobalError('SMTP IsSuccess fgets error');
break;
} else {
$line = str_replace("\r", '', str_replace("\n", '', str_replace(CRLF, '', $line)));
if (substr($line, 0, 1) != '2' && substr($line, 0, 1) != '3') {
$result = false;
$error = '[SMTP] Error <<: ' . $line;
setGlobalError($error);
break;
}
}
} while (substr($line, 3, 1) == '-');
if (!$result) {
$log->WriteLine(getGlobalError());
}
return $result;
}
示例9:
/**
* @access private
* @param unknown_type $string
*/
function _log($string)
{
$this->_log->WriteLine('Xmail: ' . $string);
}