Parcourir la source

LONG_FMT rework

master
Dirk Alders il y a 2 ans
Parent
révision
e2392c9f28
1 fichiers modifiés avec 3 ajouts et 5 suppressions
  1. 3
    5
      __init__.py

+ 3
- 5
__init__.py Voir le fichier

@@ -49,10 +49,8 @@ __INTERPRETER__ = (3, )
49 49
 
50 50
 SHORT_FMT = "%(asctime)s: %(name)s - %(levelname)s - %(message)s"
51 51
 """ A short formatter including the most important information"""
52
-LONG_FMT = """~~~~(%(levelname)-10s)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53
-File "%(pathname)s", line %(lineno)d, in %(funcName)s
54
-%(asctime)s: %(name)s- %(message)s
55
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""
52
+LONG_FMT = SHORT_FMT + \
53
+    "\n                         File \"%(pathname)s\", line %(lineno)d, in %(funcName)s"
56 54
 """ A long formatter which results in links to the source code inside Eclipse"""
57 55
 MAX_FMT = """
58 56
 %(name)s
@@ -194,7 +192,7 @@ def appLoggingConfigure(basepath, target, log_name_lvl=[], fmt=SHORT_FMT, ring_l
194 192
         })
195 193
     if host is not None and port is not None:
196 194
         target_handlers.append('socket')
197
-        handler['socket']={
195
+        handler['socket'] = {
198 196
             'level': 'DEBUG',
199 197
             'class': 'logging.handlers.SocketHandler',
200 198
             'host': host,

Chargement…
Annuler
Enregistrer