diff --git a/logger.php b/logger.php index 09aa7ff..cb36821 100644 --- a/logger.php +++ b/logger.php @@ -18,7 +18,7 @@ class logger // TODO : Add SQL support /** The method to log. Can be display, file, syslog - Can be merged with a pipe : "display|syslog|file"*/ + Can be merged with a pipe : "display|syslog|file" or put in array */ public $logtype = "display"; /** For logtype=file, the filename to use */ public $logfile = FALSE; @@ -135,7 +135,10 @@ class logger // Add the filename which generate the error $msg .= " [".basename ($back["file"]).":".$back["line"]."]"; - $logsType = explode ("|", $this->logtype); + if (is_string ($this->logtype)) + $logsType = explode ("|", $this->logtype); + elseif (is_array ($this->logtype)) + $logsType = $this->logtype; if (in_array ("display", $logsType)) $this->logdisplay ($msg, $priority); if (in_array ("file", $logsType))