23 if (\is_callable ( $logger = $config [
'logger'] )) {
36 self::$instance->_registerError ();
39 public static function inContext($contexts, $context) {
40 if ($contexts ===
null) {
43 return \array_search ( $context, $contexts ) !==
false;
46 public static function init(&$config,$application=
false) {
47 if (($application || $config [
'debug'] ===
true) && (self::$active = isset ( $config [
'logger'] ))) {
52 public static function log($level, $context, $message, $part =
null, $extra =
null) {
54 self::$instance->_log ( $level, $context, $message, $part, $extra );
58 public static function info($context, $message, $part =
null, $extra =
null) {
60 self::$instance->_info ( $context, $message, $part, $extra );
64 public static function warn($context, $message, $part =
null, $extra =
null) {
66 self::$instance->_warn ( $context, $message, $part, $extra );
70 public static function error($context, $message, $part =
null, $extra =
null) {
72 self::$instance->_error ( $context, $message, $part, $extra );
76 public static function critical($context, $message, $part =
null, $extra =
null) {
78 self::$instance->_critical ( $context, $message, $part, $extra );
82 public static function alert($context, $message, $part =
null, $extra =
null) {
84 self::$instance->_alert ( $context, $message, $part, $extra );
88 public static function appLog($level, $context, $message, $part =
null, $extra =
null) {
89 self::$instance->_log ( $level, $context, $message, $part, $extra );
92 public static function appInfo($context, $message, $part =
null, $extra =
null) {
93 self::$instance->_info ( $context, $message, $part, $extra );
96 public static function appWarn($context, $message, $part =
null, $extra =
null) {
97 self::$instance->_warn ( $context, $message, $part, $extra );
100 public static function appError($context, $message, $part =
null, $extra =
null) {
101 self::$instance->_error ( $context, $message, $part, $extra );
104 public static function appCritical($context, $message, $part =
null, $extra =
null) {
105 self::$instance->_critical ( $context, $message, $part, $extra );
108 public static function appAlert($context, $message, $part =
null, $extra =
null) {
109 self::$instance->_alert ( $context, $message, $part, $extra );
112 public static function asObjects($reverse =
true, $maxlines = 10, $contexts =
null) {
113 if (isset ( self::$instance ) && self::$active){
114 return self::$instance->_asObjects ( $reverse, $maxlines, $contexts );
121 self::$instance->_clearAll ();
127 self::$instance->_close ();
131 abstract public function _log($level, $context, $message, $part, $extra);
133 abstract public function _info($context, $message, $part, $extra);
135 abstract public function _warn($context, $message, $part, $extra);
137 abstract public function _error($context, $message, $part, $extra);
139 abstract public function _critical($context, $message, $part, $extra);
141 abstract public function _alert($context, $message, $part, $extra);
143 abstract public function _asObjects($reverse =
true, $maxlines = 10, $contexts =
null);
Abstract class for logging Ubiquity\log$Logger This class is part of Ubiquity.
static appInfo($context, $message, $part=null, $extra=null)
_warn($context, $message, $part, $extra)
_alert($context, $message, $part, $extra)
static warn($context, $message, $part=null, $extra=null)
_error($context, $message, $part, $extra)
static inContext($contexts, $context)
static appLog($level, $context, $message, $part=null, $extra=null)
static appCritical($context, $message, $part=null, $extra=null)
_info($context, $message, $part, $extra)
_log($level, $context, $message, $part, $extra)
_critical($context, $message, $part, $extra)
static critical($context, $message, $part=null, $extra=null)
static init(&$config, $application=false)
static createLogger(&$config)
static alert($context, $message, $part=null, $extra=null)
_asObjects($reverse=true, $maxlines=10, $contexts=null)
static appWarn($context, $message, $part=null, $extra=null)
static asObjects($reverse=true, $maxlines=10, $contexts=null)
static appError($context, $message, $part=null, $extra=null)
static appAlert($context, $message, $part=null, $extra=null)
static log($level, $context, $message, $part=null, $extra=null)
static error($context, $message, $part=null, $extra=null)
static info($context, $message, $part=null, $extra=null)