2.5 debugger log

Add `$depth` to log(), this makes it work the same as `dump()` and fixes #2834.