mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-07 19:03:10 +03:00
Merge pull request #58 from Athanasius/master
Add some extra logging to test for some errors, and log schemas we do…
This commit is contained in:
commit
1bdd308dc1
@ -10,7 +10,7 @@ __relayEDDN = 'tcp://eddn-relay.elite-markets.net:9500'
|
|||||||
__timeoutEDDN = 600000
|
__timeoutEDDN = 600000
|
||||||
|
|
||||||
# Set False to listen to production stream
|
# Set False to listen to production stream
|
||||||
__debugEDDN = True;
|
__debugEDDN = False;
|
||||||
|
|
||||||
# Set to False if you do not want verbose logging
|
# Set to False if you do not want verbose logging
|
||||||
__logVerboseFile = os.path.dirname(__file__) + '/Logs_Verbose_EDDN_%DATE%.htm'
|
__logVerboseFile = os.path.dirname(__file__) + '/Logs_Verbose_EDDN_%DATE%.htm'
|
||||||
@ -22,6 +22,9 @@ __logJSONFile = os.path.dirname(__file__) + '/Logs_JSON_EDDN_%DATE%.lo
|
|||||||
|
|
||||||
# A sample list of authorised softwares
|
# A sample list of authorised softwares
|
||||||
__authorisedSoftwares = [
|
__authorisedSoftwares = [
|
||||||
|
"E:D Market Connector",
|
||||||
|
"EDDiscovery",
|
||||||
|
"EDDI",
|
||||||
"EDCE",
|
"EDCE",
|
||||||
"ED-TD.SPACE",
|
"ED-TD.SPACE",
|
||||||
"EliteOCR",
|
"EliteOCR",
|
||||||
@ -110,8 +113,16 @@ def main():
|
|||||||
echoLog('')
|
echoLog('')
|
||||||
break
|
break
|
||||||
|
|
||||||
|
echoLog('Got a message')
|
||||||
|
|
||||||
__message = zlib.decompress(__message)
|
__message = zlib.decompress(__message)
|
||||||
|
if __message == False:
|
||||||
|
echoLog('Failed to decompress message')
|
||||||
|
|
||||||
__json = simplejson.loads(__message)
|
__json = simplejson.loads(__message)
|
||||||
|
if __json == False:
|
||||||
|
echoLog('Failed to parse message as json')
|
||||||
|
|
||||||
__converted = False
|
__converted = False
|
||||||
|
|
||||||
|
|
||||||
@ -203,6 +214,9 @@ def main():
|
|||||||
echoLog('')
|
echoLog('')
|
||||||
echoLog('')
|
echoLog('')
|
||||||
|
|
||||||
|
else:
|
||||||
|
echoLog('Unknown schema: ' + __json['$schemaRef']);
|
||||||
|
|
||||||
del __converted
|
del __converted
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user