Browse Source

Pretty print object when log into file

Ishan Vyas 5 years ago
parent
commit
9221ff81b8
1 changed files with 2 additions and 2 deletions
  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);