Exposes logging (with its configuration) to the REPL.

Also ensures that the stack will be included (the "Error" object in the REPL is not
the same object as it is in the main process so the instanceof check would fail).