update logs

This commit is contained in:
qiaofeng1227 2024-10-15 10:58:31 +08:00
parent a67ebff0f4
commit d75bb0b1c2
5 changed files with 19 additions and 7 deletions

View file

@ -7,3 +7,4 @@ GitPython
PyJWT
click
python-dotenv
PyYAML

View file

@ -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 =
@ -30,3 +30,4 @@ keys =
[favorite_apps]
keys =

View file

@ -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

View file

@ -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(

View file

@ -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