diff --git a/hostname_service.py b/hostname_service.py index ac168d6..7491357 100644 --- a/hostname_service.py +++ b/hostname_service.py @@ -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: