Apation to new loggging
Tento commit je obsažen v:
rodič
aa50d43799
revize
e4cdd3b7c1
@ -1,10 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
import socket_protocol
|
||||
import stringtools
|
||||
import task
|
||||
import tcp_socket
|
||||
import report
|
||||
|
||||
FULL_SCREEN = False
|
||||
|
||||
@ -31,11 +28,12 @@ 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'),
|
||||
(socket_protocol.logger_name, 'WARNING'),
|
||||
(stringtools.logger_name, 'WARNING'),
|
||||
(task.logger_name, 'WARNING'),
|
||||
(tcp_socket.logger_name, 'WARNING'),
|
||||
)
|
||||
formatter = LONG_FMT
|
||||
# Logging
|
||||
#
|
||||
APP_NAME = 'smarthome'
|
||||
LOGTARGET = 'stdout' # possible choices are: 'logfile' or 'stdout'
|
||||
|
||||
LOGHOST = 'localhost'
|
||||
LOGPORT = 19996
|
||||
|
||||
formatter = report.LONG_FMT
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit ae391a4698abc0834519cfade3c96b06a59a22d9
|
||||
Subproject commit c5f4e0323aa0a07d996372f94c9652be6fad3919
|
2
helpers
2
helpers
@ -1 +1 @@
|
||||
Subproject commit 43e0d556d1bbe6fed06bf5a90fa1bea8a8b2c81e
|
||||
Subproject commit 53e9e080f8f19c068135a67ede6ac736ba3bf94c
|
2
report
2
report
@ -1 +1 @@
|
||||
Subproject commit ce174339bc61a57dbb1c152f329d01ec4a5e1040
|
||||
Subproject commit 25889f225b3593d515e37bebffef21458c961f64
|
@ -1 +1 @@
|
||||
Subproject commit a0bfadcce811fcf2190d830dddb717dabc07875e
|
||||
Subproject commit f8cb99aa08dd26583588de206c2774a1a0b8e2bf
|
@ -18,7 +18,11 @@ import time
|
||||
import wetation_protocol
|
||||
import wx
|
||||
|
||||
logger = logging.getLogger('APP')
|
||||
try:
|
||||
from config import APP_NAME as ROOT_LOGGER_NAME
|
||||
except ImportError:
|
||||
ROOT_LOGGER_NAME = 'root'
|
||||
logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
|
||||
|
||||
|
||||
class WetationFrameProt(gui.Wetation):
|
||||
@ -340,7 +344,7 @@ class MyApp(wx.App):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
report.appLoggingConfigure(os.path.dirname(__file__), config.LOGTARGET, config.loggers, fmt=config.formatter)
|
||||
report.appLoggingConfigure(os.path.dirname(__file__), config.LOGTARGET, ((config.APP_NAME, 'DEBUG'), ), fmt=config.formatter, host=config.LOGHOST, port=config.LOGPORT)
|
||||
#
|
||||
app = MyApp(0)
|
||||
app.frame.run()
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit cd508340e390fc01ebdf81eae3b1e221aa1b658a
|
||||
Subproject commit 8a8522d26b486b005f65e7e542742e898f1109e7
|
@ -1 +1 @@
|
||||
Subproject commit d5f9931bcab942ac84d8f09b1559995da0d2676c
|
||||
Subproject commit 76d8ae9b1bfd894bc5f4b830394ce0552120a508
|
2
task
2
task
@ -1 +1 @@
|
||||
Subproject commit d3fbc5934051ab165723ca37e8f02596329f174a
|
||||
Subproject commit bbc3c6f93588942087d617e33bc5797041ae2658
|
@ -1 +1 @@
|
||||
Subproject commit d9bdc909e98f627fea4417d027ae5d9cb9e2ed81
|
||||
Subproject commit 576494b2008b857ed9b6c4bb3f162b5c73cf4b33
|
@ -1 +1 @@
|
||||
Subproject commit e9c6321772df731317b5398b624e10ff509d489b
|
||||
Subproject commit cdc9912f3d26edea9e0a36b0fccfc7d3bfd6b868
|
Načítá se…
x
Odkázat v novém úkolu
Zablokovat Uživatele