Improved some logging

This commit is contained in:
Krateng 2020-08-05 15:45:52 +02:00
parent 0fdd7669cc
commit 87cdb9987e
4 changed files with 8 additions and 14 deletions

View File

@ -5,7 +5,7 @@ author = {
"email":"maloja@krateng.dev",
"github": "krateng"
}
version = 2,6,5
version = 2,6,6
versionstr = ".".join(str(n) for n in version)
links = {
"pypi":"malojaserver",

View File

@ -44,11 +44,7 @@ def handler(apiname,version):
return deco
def handle(path,keys):
print("API request: " + str(path))
print("Keys:")
for k in keys:
print("\t",k,":",keys.get(k))
log("API request: " + str(path))# + " | Keys: " + str({k:keys.get(k) for k in keys}))
if len(path)>1 and (path[0],path[1]) in handlers:
handler = handlers[(path[0],path[1])]
@ -63,7 +59,7 @@ def handle(path,keys):
response.status = 500
print("Response: " + str(result))
log("Response: " + str(result))
return result
def scrobbletrack(artiststr,titlestr,timestamp):
@ -182,7 +178,6 @@ class LBrnz1(APIHandler):
}
def get_method(self,pathnodes,keys):
print(pathnodes)
return pathnodes.pop(0)
def submit(self,pathnodes,keys):

View File

@ -0,0 +1,5 @@
# NAME: Artists and Groups
# DESC: Combines artists that also performed as part of a group
replaceartist SING女團 S.I.N.G.
replacetitle SING-Moonlight Thoughts Moonlight Thoughts (English Version)
Can't render this file because it has a wrong number of fields in line 4.

View File

@ -717,12 +717,6 @@ def sapi(path:Multi,**keys):
@dbserver.get("sync")
def abouttoshutdown():
sync()
#sys.exit()
@dbserver.post("newrule")
def newrule(**keys):
apikey = keys.pop("key",None)