When I’m coding, I like to use this snippet for adding an enhanced logging:

https://gist.github.com/mwender/6e9c5f33335da941f5bc6d480ae54ef2

HINT: Watch your project’s log output by using tail -f /path/to/your/log.txt.