Removed unnecessary sanity checks when calling Log
This commit is contained in:
parent
b6bacdd432
commit
dca62b82d1
5 changed files with 7 additions and 26 deletions
|
@ -115,13 +115,10 @@ class Controller extends Object
|
|||
$module = new $module_class;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->config->pickles['logging'] === true)
|
||||
{
|
||||
Log::warning('Class named ' . $module_class . ' was not found in ' . $module_filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If a new module object wasn't created, create a generic one
|
||||
if (!isset($module))
|
||||
|
|
|
@ -227,7 +227,7 @@ class Database_PDO_Common extends Database_Common
|
|||
$end_time = microtime(true);
|
||||
$duration = $end_time - $start_time;
|
||||
|
||||
if ($this->config->pickles['logging'] === true && $duration >= 1)
|
||||
if ($duration >= 1)
|
||||
{
|
||||
Log::slowQuery($duration . ' seconds: ' . $loggable_query);
|
||||
}
|
||||
|
|
|
@ -204,12 +204,9 @@ class Dynamic extends Object
|
|||
$reference = $minified_reference;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->config->pickles['logging'] === true)
|
||||
{
|
||||
Log::warning('Unable to minify ' . $original_reference . ' and a minified copy does not already exist');
|
||||
}
|
||||
}
|
||||
|
||||
$reference = $this->reference($reference);
|
||||
}
|
||||
|
@ -277,12 +274,9 @@ class Dynamic extends Object
|
|||
$reference = $minified_reference;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->config->pickles['logging'] === true)
|
||||
{
|
||||
Log::warning('Unable to minify ' . $original_reference . ' and a minified copy does not already exist');
|
||||
}
|
||||
}
|
||||
|
||||
$reference = $this->reference($reference);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class Error
|
|||
{
|
||||
if (Log::error($message) == false)
|
||||
{
|
||||
$message .= '<br /><br />This error message could not be logged as the log path or log file is not writable';
|
||||
$message .= '<br><br>This error message could not be logged as the log path or log file is not writable';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1356,8 +1356,6 @@ class Model extends Object
|
|||
// Clears the cache
|
||||
if ($update && $this->use_cache)
|
||||
{
|
||||
Log::information('CACHE: Deleted Keys: ' . implode(', ', $cache_keys));
|
||||
|
||||
$this->cache->delete($cache_keys);
|
||||
}
|
||||
|
||||
|
@ -1529,11 +1527,7 @@ class Model extends Object
|
|||
// Clears the cache
|
||||
if ($update && $this->use_cache)
|
||||
{
|
||||
$cache_key = strtoupper($this->model) . '-' . $this->record[$this->columns['id']];
|
||||
|
||||
Log::information('CACHE: Delete Key: ' . $cache_key);
|
||||
|
||||
$this->cache->delete($cache_key);
|
||||
$this->cache->delete(strtoupper($this->model) . '-' . $this->record[$this->columns['id']]);
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
@ -1587,11 +1581,7 @@ class Model extends Object
|
|||
// Clears the cache
|
||||
if ($this->use_cache)
|
||||
{
|
||||
$cache_key = strtoupper($this->model) . '-' . $this->record[$this->columns['id']];
|
||||
|
||||
Log::information('CACHE: Deleted Key: ' . $cache_key);
|
||||
|
||||
$this->cache->delete($cache_key);
|
||||
$this->cache->delete(strtoupper($this->model) . '-' . $this->record[$this->columns['id']]);
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue