mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 08:22:17 +00:00
- application/core/* -> CS compliant
- application/libraries/* -> CS compliant - FHC_Model isEntitled method now return error() or success() - Updated all code that uses isEntitled method from FHC_Model - Removed Squiz.PHP.DisallowSizeFunctionsInLoops from CS ruleset - Removed depracated method replace from DB_Model - Removed unused method pgArrayPhp from DB_Model - Renamed method arrayMergeIndex to _arrayCombine in DB_Model and set as private - Added method _manageUDFs to DB_Model (a wrapper for UDFLib->manageUDFs)
This commit is contained in:
@@ -17,24 +17,25 @@ class LogLib
|
||||
const LINE_SEPARATOR = ':';
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
* format
|
||||
*/
|
||||
public function __construct() {}
|
||||
|
||||
private function format($class, $function, $line)
|
||||
{
|
||||
$formatted = LogLib::CALLER_PREFIX;
|
||||
|
||||
if (!is_null($class) && $class != '')
|
||||
{
|
||||
$formatted .= $class . LogLib::CLASS_POSTFIX;
|
||||
$formatted .= $class.LogLib::CLASS_POSTFIX;
|
||||
}
|
||||
|
||||
$formatted .= $function . LogLib::LINE_SEPARATOR . $line . LogLib::CALLER_POSTFIX . ' ';
|
||||
$formatted .= $function.LogLib::LINE_SEPARATOR.$line.LogLib::CALLER_POSTFIX.' ';
|
||||
|
||||
return $formatted;
|
||||
}
|
||||
|
||||
/**
|
||||
* getCaller
|
||||
*/
|
||||
private function getCaller()
|
||||
{
|
||||
$classIndex = 3;
|
||||
@@ -62,13 +63,16 @@ class LogLib
|
||||
return $this->format($class, $function, $line);
|
||||
}
|
||||
|
||||
/**
|
||||
* log
|
||||
*/
|
||||
private function log($level, $message)
|
||||
{
|
||||
log_message($level, $this->getCaller() . $message);
|
||||
log_message($level, $this->getCaller().$message);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* logDebug
|
||||
*/
|
||||
public function logDebug($message)
|
||||
{
|
||||
@@ -76,7 +80,7 @@ class LogLib
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* logInfo
|
||||
*/
|
||||
public function logInfo($message)
|
||||
{
|
||||
@@ -84,10 +88,10 @@ class LogLib
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* logError
|
||||
*/
|
||||
public function logError($message)
|
||||
{
|
||||
$this->log(LogLib::ERROR, $message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user