Skip to content

Commit

Permalink
Add explicatory comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aleron75 committed Nov 29, 2015
1 parent e290df5 commit 388a114
Showing 1 changed file with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion src/app/code/community/Aleron75/Magelog/Model/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,41 +118,94 @@ public function logException($e)
$this->_logger->logException($e);
}

/**
* Use to log informativedebug messages.
*
* Debugging messages bring extended information about application processing.
* Such messages usually report calls of important functions along with results they return
* and values of specific variables or parameters.
*/
public function debug($data, $forceLog = null)
{
return $this->log($data, Zend_Log::DEBUG, $forceLog);
}

/**
* Use to log informative messages.
*
* Informative messages are usually used for reporting significant application progress and stages.
* Informative messages should not be reported too frequently because they can quickly become noise.
*/
public function info($data, $forceLog = null)
{
return $this->log($data, Zend_Log::INFO, $forceLog);
}

/**
* Use to log normal but significant condition.
*/
public function notice($data, $forceLog = null)
{
return $this->log($data, Zend_Log::NOTICE, $forceLog);
}

/**
* Use to log that application encountered warning conditions.
*
* Such messages are reported when something unusual happened that is not critical to process,
* but it would be useful to review this situation to decide if it should be resolved.
*/
public function warn($data, $forceLog = null)
{
return $this->log($data, Zend_Log::WARN, $forceLog);
}

/**
* Use to log that application encountered error conditions.
*
* A problem occurred while processing the current operation.
* Such a message usually requires the user to interact with the application or research the problem
* in order to find the reason and resolve it.
*/
public function err($data, $forceLog = null)
{
return $this->log($data, Zend_Log::ERR, $forceLog);
}

/**
* Use to log that application is in critical conditions.
*
* A critical problem occurred while processing the current operation.
* The application is in a critical state and cannot proceed with the execution of the current operation.
* In this case, the application usually reports such message and terminates.
* Such a message usually requires the user to interact with the application or research the problem
* in order to find the reason and resolve it.
*/
public function crit($data, $forceLog = null)
{
return $this->log($data, Zend_Log::CRIT, $forceLog);
}

/**
* Use to log that an action must be taken immediately.
*
* A very critical problem occurred while processing the current operation.
* Such a message usually requires the user to interact urgently with the application or research the problem
* in order to find the reason and resolve it.
*/
public function alert($data, $forceLog = null)
{
return $this->log($data, Zend_Log::ALERT, $forceLog);
}

/**
* Use to log that system is unusable.
*
* The application is in an unusable state and cannot proceed with the execution of the current operation.
* In this case, the application usually reports such message and terminates.
* Such a message usually requires the user to interact immediately with the application or research the problem
* in order to find the reason and resolve it.
*/
public function emerg($data, $forceLog = null)
{
return $this->log($data, Zend_Log::EMERG, $forceLog);
Expand Down Expand Up @@ -190,4 +243,4 @@ public function setLogAdditionalData($logAdditionalData)
$this->_logAdditionalData = $logAdditionalData;
}

}
}

0 comments on commit 388a114

Please sign in to comment.