Last active
December 17, 2015 12:09
-
-
Save raulfraile/5607655 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Psr\Log; | |
/** | |
* Describes a logger instance | |
*/ | |
interface LoggerInterface | |
{ | |
/** | |
* System is unusable. | |
* | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function emergency($message, array $context = array()); | |
/** | |
* Action must be taken immediately. | |
* | |
* Example: Entire website down, database unavailable, etc. This should | |
* trigger the SMS alerts and wake you up. | |
* | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function alert($message, array $context = array()); | |
/** | |
* Critical conditions. | |
* | |
* Example: Application component unavailable, unexpected exception. | |
* | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function critical($message, array $context = array()); | |
/** | |
* Runtime errors that do not require immediate action but should typically | |
* be logged and monitored. | |
* | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function error($message, array $context = array()); | |
/** | |
* Exceptional occurrences that are not errors. | |
* | |
* Example: Use of deprecated APIs, poor use of an API, undesirable things | |
* that are not necessarily wrong. | |
* | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function warning($message, array $context = array()); | |
/** | |
* Normal but significant events. | |
* | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function notice($message, array $context = array()); | |
/** | |
* Interesting events. | |
* | |
* Example: User logs in, SQL logs. | |
* | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function info($message, array $context = array()); | |
/** | |
* Detailed debug information. | |
* | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function debug($message, array $context = array()); | |
/** | |
* Logs with an arbitrary level. | |
* | |
* @param mixed $level | |
* @param string $message | |
* @param array $context | |
* @return null | |
*/ | |
public function log($level, $message, array $context = array()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment