I have a project that has JavaScript in 2 places. One is using node.js on the server-side while the other is obviously the browser JavaScript. I am required to support any browser and I'd like to have a single logging framework for all of them. I picked log4js which works great for logging strings but for objects it has a bit of difficulty.
In node when I do Logger.debug(someObject);
I get a beautiful printout of the object. When I try to do this with my browser JavaScript I get [object Object] which is useless.
Anyone know how to do this?
(node is using the terminal as the output console and the browser JavaScript is using the Browser's (Chrome) Console)