37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: UTF-8 -*-
|
|
|
|
import geo
|
|
import socket_protocol
|
|
import state_machine
|
|
import stringtools
|
|
import task
|
|
import tcp_socket
|
|
|
|
secret = b'give_a_secret_string_here'
|
|
server_ip = '127.0.0.1'
|
|
server_port = 10001
|
|
|
|
LOG_TARGET_STDOUT = 'stdout'
|
|
LOG_TARGET_FILE = 'logfile'
|
|
LOG_TARGET = LOG_TARGET_STDOUT
|
|
|
|
|
|
SHORT_FMT = "%(asctime)s: %(levelname)-7s - %(message)s"
|
|
""" A short formatter including the most important information"""
|
|
LONG_FMT = """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
File "%(pathname)s", line %(lineno)d, in %(funcName)s
|
|
%(asctime)s: %(levelname)-7s - %(message)s"""
|
|
""" A long formatter which results in links to the source code inside Eclipse"""
|
|
|
|
loggers = (
|
|
('APP', 'DEBUG'),
|
|
(geo.logger_name, 'DEBUG'),
|
|
(socket_protocol.logger_name, 'DEBUG'),
|
|
(state_machine.logger_name, 'DEBUG'),
|
|
(stringtools.logger_name, 'DEBUG'),
|
|
(task.logger_name, 'DEBUG'),
|
|
(tcp_socket.logger_name, 'DEBUG'),
|
|
)
|
|
formatter = LONG_FMT
|