Leyk lightener application for raspberry pi and piface module.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

config.py 1.0KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3. import geo
  4. import socket_protocol
  5. import state_machine
  6. import stringtools
  7. import task
  8. import tcp_socket
  9. secret = b'give_a_secret_string_here'
  10. server_ip = '127.0.0.1'
  11. server_port = 10001
  12. LOG_TARGET_STDOUT = 'stdout'
  13. LOG_TARGET_FILE = 'logfile'
  14. LOG_TARGET = LOG_TARGET_STDOUT
  15. SHORT_FMT = "%(asctime)s: %(levelname)-7s - %(message)s"
  16. """ A short formatter including the most important information"""
  17. LONG_FMT = """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. File "%(pathname)s", line %(lineno)d, in %(funcName)s
  19. %(asctime)s: %(levelname)-7s - %(message)s"""
  20. """ A long formatter which results in links to the source code inside Eclipse"""
  21. loggers = (
  22. ('APP', 'DEBUG'),
  23. (geo.logger_name, 'DEBUG'),
  24. (socket_protocol.logger_name, 'DEBUG'),
  25. (state_machine.logger_name, 'DEBUG'),
  26. (stringtools.logger_name, 'DEBUG'),
  27. (task.logger_name, 'DEBUG'),
  28. (tcp_socket.logger_name, 'DEBUG'),
  29. )
  30. formatter = LONG_FMT