diff --git a/src/app/code/community/Aleron75/Magelog/Model/Logger.php b/src/app/code/community/Aleron75/Magelog/Model/Logger.php index ff49580..f87f941 100644 --- a/src/app/code/community/Aleron75/Magelog/Model/Logger.php +++ b/src/app/code/community/Aleron75/Magelog/Model/Logger.php @@ -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); @@ -190,4 +243,4 @@ public function setLogAdditionalData($logAdditionalData) $this->_logAdditionalData = $logAdditionalData; } -} \ No newline at end of file +}