瀏覽代碼

Module update and loglevel to config

mod_update
Dirk Alders 3 年之前
父節點
當前提交
2eb8a99c4b
共有 6 個檔案被更改,包括 7 行新增9 行删除
  1. 2
    4
      config_example/config.py
  2. 1
    1
      leyk.py
  3. 1
    1
      protocol
  4. 1
    1
      socket_protocol
  5. 1
    1
      state_machine
  6. 1
    1
      stringtools

+ 2
- 4
config_example/config.py 查看文件

@@ -10,10 +10,8 @@ server_port = 10001
10 10
 # Logging
11 11
 #
12 12
 APP_NAME = 'leyk'
13
-
14
-LOG_TARGET_STDOUT = 'stdout'
15
-LOG_TARGET_FILE = 'logfile'
16
-LOGTARGET = LOG_TARGET_STDOUT
13
+LOGTARGET = 'stdout'
14
+LOGLVL = 'DEBUG'
17 15
 
18 16
 LOGHOST = 'localhost'
19 17
 LOGPORT = 19996

+ 1
- 1
leyk.py 查看文件

@@ -10,7 +10,7 @@ import time
10 10
 
11 11
 
12 12
 if __name__ == '__main__':
13
-    report.appLoggingConfigure(os.path.dirname(__file__), config.LOGTARGET, ((config.APP_NAME, 'DEBUG'), ), fmt=config.formatter, host=config.LOGHOST, port=config.LOGPORT)
13
+    report.appLoggingConfigure(os.path.dirname(__file__), config.LOGTARGET, ((config.APP_NAME, config.LOGLVL), ), fmt=config.formatter, host=config.LOGHOST, port=config.LOGPORT)
14 14
     s = tcp_socket.tcp_server_stp(config.server_ip, port=config.server_port)
15 15
     prot = protocol.my_server_protocol(s, secret=config.secret)
16 16
     while True:

+ 1
- 1
protocol

@@ -1 +1 @@
1
-Subproject commit 6ac1b584fb53aeb58c1b9809fff306a56dd32400
1
+Subproject commit 2ca538c49fe141ed356f28bb019c81b1b2d8890b

+ 1
- 1
socket_protocol

@@ -1 +1 @@
1
-Subproject commit 7c02c8dd3cc5b24a1ba8ce71c0b7396f3759671e
1
+Subproject commit 35d9f688a4f080a8cae70a18e27036b55399edde

+ 1
- 1
state_machine

@@ -1 +1 @@
1
-Subproject commit 561b564b3dc9298936de5b4b51267e56d86ac426
1
+Subproject commit db70e14d4650c9894ee0ff5c5c6078264ce59b46

+ 1
- 1
stringtools

@@ -1 +1 @@
1
-Subproject commit 76d8ae9b1bfd894bc5f4b830394ce0552120a508
1
+Subproject commit 5ac92e2b864cd27bd4026352ba9149f4d23ca019

Loading…
取消
儲存