How can i redirect the console.dir(obj)
output to a file instead of the console?
I considered overwriting console.dir (with my custom fn.)to use file stream instead of stdout stream but the logic to walk down the object tree scares me.
Note: My node process is launched indirectly by emacs editor, so i cant use pipe to redirect any output.