Logging for while, still a bit incomplete.