optimize the log moudle