Some generic core code of codelogger.