Add verbage in logging steps
This commit is contained in:
1 parent
424982cd3c
commit
3c21f648de
1 file changed
+2
-2
+2
-2
@@ -18,7 +18,7 @@ load_dotenv(dotenv_path=dotenv_p)
|
||||
|
||||
HOST = os.getenv("HOST", "0.0.0.0")
|
||||
PORT = int(os.getenv("PORT", 8999))
|
||||
LOG_FILE = os.path.join(os.path.dirname(__file__), 'hostname_service.log')
|
||||
LOG_FILE = os.getenv("LOG_FILE", os.path.join(os.path.dirname(__file__), 'hostname_service.log'))
|
||||
|
||||
logging.basicConfig(
|
||||
filename=LOG_FILE,
|
||||
@@ -119,7 +119,7 @@ if __name__ == '__main__':
|
||||
else:
|
||||
if sys.argv[1] == "run":
|
||||
# Allow running standalone (not as service)
|
||||
logging.info("Running in standalone HTTP mode.")
|
||||
logging.info("Running in standalone HTTP mode on port {PORT} for host {HOST}")
|
||||
httpd = HTTPServer((HOST, PORT), RequestHandler)
|
||||
print(f"Listening on port {PORT} for host {HOST}...")
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user