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

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -