|
@@ -33,14 +33,21 @@ class Log {
|
|
|
*
|
|
|
*
|
|
|
* Log::error('Something went horribly wrong!');
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * Log::write('info', array('name' => 'Sawny', 'passwd' => '1234', array(1337, 21, 0)), true);
|
|
|
+ *
|
|
|
+ *
|
|
|
* </code>
|
|
|
*
|
|
|
* @param string $type
|
|
|
* @param string $message
|
|
|
* @return void
|
|
|
*/
|
|
|
- public static function write($type, $message)
|
|
|
+ public static function write($type, $message, $pretty_print = false)
|
|
|
{
|
|
|
+ $message = ($pretty_print) ? print_r($message, true) : $message;
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -75,11 +82,18 @@ class Log {
|
|
|
*
|
|
|
*
|
|
|
* Log::warning('This is a warning!');
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * Log::info(array('name' => 'Sawny', 'passwd' => '1234', array(1337, 21, 0)), true);
|
|
|
+ *
|
|
|
+ *
|
|
|
* </code>
|
|
|
*/
|
|
|
public static function __callStatic($method, $parameters)
|
|
|
{
|
|
|
- static::write($method, $parameters[0]);
|
|
|
+ $parameters[1] = (empty($parameters[1])) ? false : $parameters[1];
|
|
|
+
|
|
|
+ static::write($method, $parameters[0], $parameters[1]);
|
|
|
}
|
|
|
|
|
|
}
|