Add logging
Fix cache logging bug
Merge branch 'logging' into dev
Resolve merge conflicts