Turn off debug messages

This commit is contained in:
JJTech0130 2023-07-25 18:56:36 -04:00
parent 052b5a2f7b
commit 9be46ffcab
No known key found for this signature in database
GPG key ID: 23C92EBCCF8F93D6

10
demo.py
View file

@ -17,7 +17,7 @@ logging.basicConfig(
logging.getLogger("urllib3").setLevel(logging.WARNING) logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("jelly").setLevel(logging.INFO) logging.getLogger("jelly").setLevel(logging.INFO)
logging.getLogger("nac").setLevel(logging.INFO) logging.getLogger("nac").setLevel(logging.INFO)
logging.getLogger("apns").setLevel(logging.DEBUG) logging.getLogger("apns").setLevel(logging.INFO)
logging.getLogger("albert").setLevel(logging.INFO) logging.getLogger("albert").setLevel(logging.INFO)
logging.getLogger("ids").setLevel(logging.DEBUG) logging.getLogger("ids").setLevel(logging.DEBUG)
logging.getLogger("bags").setLevel(logging.DEBUG) logging.getLogger("bags").setLevel(logging.DEBUG)
@ -137,7 +137,7 @@ else:
# if len(identity) > 5: # if len(identity) > 5:
# logging.warning(identity) # logging.warning(identity)
logging.debug(user.lookup(["mailto:usert4@icloud.com", "mailto:jjtech@jjtech.dev"])) #logging.debug(user.lookup(["mailto:usert4@icloud.com", "mailto:jjtech@jjtech.dev"]))
# resp = user.lookup(["mailto:jjtech@jjtech.dev"]) # resp = user.lookup(["mailto:jjtech@jjtech.dev"])
# info = resp["mailto:jjtech@jjtech.dev"] # info = resp["mailto:jjtech@jjtech.dev"]
# identities = info["identities"] # identities = info["identities"]
@ -215,7 +215,8 @@ def decrypt(payload):
#print(pt) #print(pt)
pt = gzip.decompress(pt) pt = gzip.decompress(pt)
payload = plistlib.loads(pt) payload = plistlib.loads(pt)
logging.info(f"Got payload: {payload}") #logging.debug(f"Got payload: {payload}")
return payload
import plistlib import plistlib
@ -235,6 +236,7 @@ while True:
resp_body = plistlib.loads(resp_body) resp_body = plistlib.loads(resp_body)
#logging.info(f"Got response: {resp_body}") #logging.info(f"Got response: {resp_body}")
payload = resp_body["P"] payload = resp_body["P"]
decrypt(payload) payload = decrypt(payload)
logging.info(f"Got message: {payload['t']} from {payload['p'][1]}")