Logging improvements
Merge pull request #2953 from sebv/better-logging

Logging improvements