diff --git a/apphub/requirements.txt b/apphub/requirements.txt index b88ba019..16dc33c5 100755 --- a/apphub/requirements.txt +++ b/apphub/requirements.txt @@ -6,4 +6,5 @@ requests GitPython PyJWT click -python-dotenv \ No newline at end of file +python-dotenv +PyYAML \ No newline at end of file diff --git a/apphub/src/config/config.ini b/apphub/src/config/config.ini index c38228c1..d402a3de 100644 --- a/apphub/src/config/config.ini +++ b/apphub/src/config/config.ini @@ -1,7 +1,7 @@ [nginx_proxy_manager] base_url = http://websoft9-proxy:81/api user_name = admin@mydomain.com -user_pwd = Csj18AHvtBWzuIFA +user_pwd = cPCB9bSsX91ljxCQ nike_name = admin listen_port = 80 @@ -9,15 +9,15 @@ listen_port = 80 base_url = http://websoft9-git:3000/api/v1 user_name = websoft9 user_email = admin@mydomain.com -user_pwd = vcwIB64zPslu +user_pwd = KhuXTC7idguL [portainer] base_url = http://websoft9-deployment:9000/api user_name = admin -user_pwd = L@BI75LJ7Shi7oLA +user_pwd = yzJZ938iOoDG [api_key] -key = bd3d92e0f52e299d014c38f8aac7f730602a8a7a41adbee77eddf07b391b9d31 +key = cc9223b3055471a6f4f9654e08371816a9637ba1c57383617b0684b92ac7b2f4 [domain] wildcard_domain = @@ -29,4 +29,5 @@ port = 9000 keys = [favorite_apps] -keys = \ No newline at end of file +keys = + diff --git a/apphub/src/core/logger.py b/apphub/src/core/logger.py index fd01ca80..a034c1be 100755 --- a/apphub/src/core/logger.py +++ b/apphub/src/core/logger.py @@ -69,6 +69,8 @@ class Logger(metaclass=SingletonMeta): file_handler.setFormatter(formatter) file_handler.setLevel(logging.DEBUG) + #logger.propagate = False + logger.addHandler(file_handler) return logger diff --git a/apphub/src/services/common_check.py b/apphub/src/services/common_check.py index f6af7829..a9e0d94f 100755 --- a/apphub/src/services/common_check.py +++ b/apphub/src/services/common_check.py @@ -152,7 +152,6 @@ def check_apps_number(endpointId:int): # Get the official and status is 1(Active) or 3(Installing) apps app_official = [app for app in appInstallApps if app.app_official == True and (app.status == 1 or app.status == 3)] - logger.access(f"app_official:{len(app_official)}") if len(app_official) >= int(max_apps): logger.error(f"Exceed the maximum number of apps") raise CustomException( diff --git a/apphub/src/utils/log_filters.py b/apphub/src/utils/log_filters.py new file mode 100644 index 00000000..772e05b0 --- /dev/null +++ b/apphub/src/utils/log_filters.py @@ -0,0 +1,9 @@ +import logging +import re + +class IgnoreSpecificRequestsFilter(logging.Filter): + def filter(self, record): + message = record.getMessage() + if re.search(r"GET\s+/api/apps\s", message): + return False + return True