Monolog, how to log PHP array into console? -


i using browser handler log message js console

require_once 'vendor/autoload.php';  use monolog\logger; use monolog\handler\browserconsolehandler;  $log = new logger('name'); $log->pushhandler(new browserconsolehandler);  $data = array(1,2,3,4);  // add records log $log->addwarning('foo'); 

i wondering, possible log array such $data console reassemble array content?

try this:

$log->addwarning('foo: ' . var_export($data, true)); 

Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

clojure - 'get' replacement that throws exception on not found? -