log system refactoring