Removed unnecessary sanity checks when calling Log

This commit is contained in:
Josh Sherman 2013-09-15 12:02:07 -04:00
parent b6bacdd432
commit dca62b82d1
5 changed files with 7 additions and 26 deletions

View file

@ -116,10 +116,7 @@ class Controller extends Object
}
else
{
if ($this->config->pickles['logging'] === true)
{
Log::warning('Class named ' . $module_class . ' was not found in ' . $module_filename);
}
Log::warning('Class named ' . $module_class . ' was not found in ' . $module_filename);
}
}

View file

@ -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);
}

View file

@ -205,10 +205,7 @@ class Dynamic extends Object
}
else
{
if ($this->config->pickles['logging'] === true)
{
Log::warning('Unable to minify ' . $original_reference . ' and a minified copy does not already exist');
}
Log::warning('Unable to minify ' . $original_reference . ' and a minified copy does not already exist');
}
$reference = $this->reference($reference);
@ -278,10 +275,7 @@ class Dynamic extends Object
}
else
{
if ($this->config->pickles['logging'] === true)
{
Log::warning('Unable to minify ' . $original_reference . ' and a minified copy does not already exist');
}
Log::warning('Unable to minify ' . $original_reference . ' and a minified copy does not already exist');
}
$reference = $this->reference($reference);

View file

@ -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';
}
}
?>

View file

@ -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;