diff --git a/request_server.py b/request_server.py index 237d1b3..756edf9 100755 --- a/request_server.py +++ b/request_server.py @@ -7,18 +7,14 @@ import sys import time import uuid -logging.basicConfig(level= logging.INFO) - -logger = logging.getLogger(__name__) - -formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') - - -handler = logging.FileHandler('/home/request/request_server.log') - -handler.setFormatter(formatter) - -logger.addHandler(handler) +logfile= '/home/request/request_server.log' +logging.basicConfig( + filename= logfile, + format= '%(asctime)s - %(name)s - %(levelname)s - %(message)s', + level= logging.INFO, + ) + +logger = logging.getLogger('request_server')) REQUESTS_PATH = "/var/lib/ca_manager/requests"