ソースを参照

Pretty print object when log into file

Ishan Vyas 5 年 前
コミット
9221ff81b8
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/Utility/Log.php

+ 2 - 2
src/Utility/Log.php

@@ -52,8 +52,8 @@ class Log {
 	public static function write($data, $filename = null, $traceKey = false) {
 		static::_init($filename);
 
-		// Pretty print array
-		if (is_array($data)) {
+		// Pretty print array or object
+		if (is_array($data) || is_object($data)) {
 			if ($traceKey) {
 				try {
 					throw new Exception('Trace string', 1);