diff --git a/ycast/__main__.py b/ycast/__main__.py index 05444a5..3d80462 100755 --- a/ycast/__main__.py +++ b/ycast/__main__.py @@ -14,7 +14,11 @@ def launch_server(): parser.add_argument('-c', action='store', dest='config', help='Station configuration', default=None) parser.add_argument('-l', action='store', dest='address', help='Listen address', default='0.0.0.0') parser.add_argument('-p', action='store', dest='port', type=int, help='Listen port', default=80) + parser.add_argument('-d', action='store_true', dest='debug', help='Enable debug logging') arguments = parser.parse_args() + if arguments.debug: + logging.getLogger().setLevel(logging.DEBUG) + logging.debug("Debug logging enabled") logging.info("YCast server starting on %s:%s" % (arguments.address, arguments.port)) server.run(arguments.config, arguments.address, arguments.port)