optimitze the log module and change the share memory code style for mine