UniversalDevicesInc / polyglot-v2-python-interface

Python Interface for NodeServers to Polyglot v2
MIT License
7 stars 4 forks source link

Change Logger to allow nodeserver to configure formatter #21

Closed jimboca closed 4 years ago

jimboca commented 4 years ago

Since some authors won't like the default format, this allows them to change to what they want. I tried to find a cleaner way to do this but this is the best I could do. Let me know if you have any suggestion for improvement.

jimboca commented 4 years ago

Travis fails on new install, I'll have to fix that tomorrow, I know what the issue is.

jimboca commented 4 years ago

It all looks good now, just moved all log creation functions into separate file. @firstone I really like your ideas, but not sure how to implement it when polyinterface is imported multiple times?

firstone commented 4 years ago

imports don't run in separate contexts. Variable is only initialized once. You import same variable into different files.

jimboca commented 4 years ago

imports don't run in separate contexts. Variable is only initialized once. You import same variable into different files.

Did not know exactly how python imports work, I will redo with your suggestions.