Logging for contests
http://art-of-small-steps.blogspot.ie/2017/11/logging-in-programming-contests.html
TL;DR example is here https://gist.github.com/metaflow/87d7df206e1e0a9fa9eb8a5dc4ac6bea
Codeforces Round 946 Solution Discussion