Fix code example for log level checking.

Rebase of #250 on `dev_4_4`.