diff options
-rw-r--r-- | bazarr/app/config.py | 4 | ||||
-rw-r--r-- | bazarr/app/logger.py | 9 | ||||
-rw-r--r-- | bazarr/app/server.py | 5 | ||||
-rw-r--r-- | frontend/src/pages/Settings/General/index.tsx | 4 |
4 files changed, 13 insertions, 9 deletions
diff --git a/bazarr/app/config.py b/bazarr/app/config.py index 73ed05e7c..95e3db4f9 100644 --- a/bazarr/app/config.py +++ b/bazarr/app/config.py @@ -31,6 +31,8 @@ def base_url_slash_cleaner(uri): def validate_ip_address(ip_string): + if ip_string == '*': + return True try: ip_address(ip_string) return True @@ -73,7 +75,7 @@ validators = [ # general section Validator('general.flask_secret_key', must_exist=True, default=hexlify(os.urandom(16)).decode(), is_type_of=str), - Validator('general.ip', must_exist=True, default='0.0.0.0', is_type_of=str, condition=validate_ip_address), + Validator('general.ip', must_exist=True, default='*', is_type_of=str, condition=validate_ip_address), Validator('general.port', must_exist=True, default=6767, is_type_of=int, gte=1, lte=65535), Validator('general.base_url', must_exist=True, default='', is_type_of=str), Validator('general.path_mappings', must_exist=True, default=[], is_type_of=list), diff --git a/bazarr/app/logger.py b/bazarr/app/logger.py index a47acf3dc..8803ad3cb 100644 --- a/bazarr/app/logger.py +++ b/bazarr/app/logger.py @@ -58,10 +58,13 @@ class NoExceptionFormatter(logging.Formatter): class UnwantedWaitressMessageFilter(logging.Filter): def filter(self, record): - if settings.general.debug: - # no filtering in debug mode + if settings.general.debug or "BAZARR" in record.msg: + # no filtering in debug mode or if originating from us return True + if record.level != loggin.ERROR: + return False + unwantedMessages = [ "Exception while serving /api/socket.io/", ['Session is disconnected', 'Session not found'], @@ -161,7 +164,7 @@ def configure_logging(debug=False): logging.getLogger("websocket").setLevel(logging.CRITICAL) logging.getLogger("ga4mp.ga4mp").setLevel(logging.ERROR) - logging.getLogger("waitress").setLevel(logging.ERROR) + logging.getLogger("waitress").setLevel(logging.INFO) logging.getLogger("waitress").addFilter(UnwantedWaitressMessageFilter()) logging.getLogger("knowit").setLevel(logging.CRITICAL) logging.getLogger("enzyme").setLevel(logging.CRITICAL) diff --git a/bazarr/app/server.py b/bazarr/app/server.py index 1def54dab..4ffe436ce 100644 --- a/bazarr/app/server.py +++ b/bazarr/app/server.py @@ -50,7 +50,7 @@ class Server: self.connected = True except OSError as error: if error.errno == errno.EADDRNOTAVAIL: - logging.exception("BAZARR cannot bind to specified IP, trying with default (0.0.0.0)") + logging.exception("BAZARR cannot bind to specified IP, trying with 0.0.0.0") self.address = '0.0.0.0' self.connected = False super(Server, self).__init__() @@ -76,8 +76,7 @@ class Server: self.shutdown(EXIT_INTERRUPT) def start(self): - logging.info(f'BAZARR is started and waiting for request on http://{self.server.effective_host}:' - f'{self.server.effective_port}') + self.server.print_listen("BAZARR is started and waiting for requests on: http://{}:{}") signal.signal(signal.SIGINT, self.interrupt_handler) try: self.server.run() diff --git a/frontend/src/pages/Settings/General/index.tsx b/frontend/src/pages/Settings/General/index.tsx index 312d09d1f..6db3ee7fc 100644 --- a/frontend/src/pages/Settings/General/index.tsx +++ b/frontend/src/pages/Settings/General/index.tsx @@ -43,10 +43,10 @@ const SettingsGeneralView: FunctionComponent = () => { <Section header="Host"> <Text label="Address" - placeholder="0.0.0.0" + placeholder="*" settingKey="settings-general-ip" ></Text> - <Message>Valid IPv4 address or '0.0.0.0' for all interfaces</Message> + <Message>Valid IP address or '*' for all interfaces</Message> <Number label="Port" placeholder="6767" |