Skip to content

Instantly share code, notes, and snippets.

@TTimo
Created January 14, 2019 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TTimo/e093b3001a17206d41283a427c7a999d to your computer and use it in GitHub Desktop.
Save TTimo/e093b3001a17206d41283a427c7a999d to your computer and use it in GitHub Desktop.
from thespian.actors import ActorSystem
import sys
import logging
logcfg = {
'version': 1,
'formatters': {
'normal': {'format': '%(levelname)-8s %(message)s'},
},
'handlers': {
'h1': {'class': 'logging.FileHandler',
'filename': 'start.log',
'formatter': 'normal',
'level': logging.DEBUG},
},
'loggers': {
'': {'handlers': ['h1',], 'level': logging.DEBUG}
},
}
if __name__ == "__main__":
ActorSystem((sys.argv + ['multiprocTCPBase'])[1], logDefs=logcfg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment