Ported logger
Logger tweaks
Added log caching