Documentation fixes on topics logging - add code-block and fix 3 spaces indentation

There is no ticket related.
It looks to me like the highlighting on this block works okay with the old style. I'd prefer to keep it like that. The reason is that it's less verbose and also if a syntax error is introduced, the block highlighting will break which helps illuminate problems. When you use `.. code-block:: python` it forces the syntax highlighting even if there are errors so we only need it when the auto-syntax highlighting doesn't work and we can't or don't want to fix the example.