refactor log,daemon server