Refactoring of session logger.