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