log configuration&code reorganize