babyweb 0.1.1__py3-none-any.whl → 0.1.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- babyweb/logger.py +14 -10
- babyweb/requesters.py +1 -1
- babyweb/util/__init__.py +1 -1
- babyweb/version.py +1 -1
- {babyweb-0.1.1.dist-info → babyweb-0.1.1.2.dist-info}/METADATA +1 -1
- {babyweb-0.1.1.dist-info → babyweb-0.1.1.2.dist-info}/RECORD +9 -9
- {babyweb-0.1.1.dist-info → babyweb-0.1.1.2.dist-info}/LICENSE +0 -0
- {babyweb-0.1.1.dist-info → babyweb-0.1.1.2.dist-info}/WHEEL +0 -0
- {babyweb-0.1.1.dist-info → babyweb-0.1.1.2.dist-info}/top_level.txt +0 -0
babyweb/logger.py
CHANGED
|
@@ -5,28 +5,32 @@ from .config import config
|
|
|
5
5
|
|
|
6
6
|
logger_getter = get_logger_getter("httpd", syslog, config.log.allow)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
print(args, kwargs)
|
|
8
|
+
_LOG = None
|
|
10
9
|
|
|
11
|
-
# setters (see above)
|
|
12
10
|
def setlog(f):
|
|
13
|
-
global
|
|
14
|
-
|
|
11
|
+
global _LOG
|
|
12
|
+
_LOG = f
|
|
13
|
+
|
|
14
|
+
def log(*args, **kwargs):
|
|
15
|
+
if _LOG:
|
|
16
|
+
_LOG(*args, **kwargs)
|
|
17
|
+
else:
|
|
18
|
+
print(args, kwargs)
|
|
15
19
|
|
|
16
20
|
TMSNAP = None
|
|
17
21
|
|
|
18
22
|
def log_tracemalloc():
|
|
19
23
|
global TMSNAP
|
|
20
24
|
snapshot = tracemalloc.take_snapshot()
|
|
21
|
-
|
|
25
|
+
syslog("[LINEMALLOC START]", important=True)
|
|
22
26
|
if TMSNAP:
|
|
23
27
|
lines = snapshot.compare_to(TMSNAP, 'lineno')
|
|
24
28
|
else:
|
|
25
29
|
lines = snapshot.statistics("lineno")
|
|
26
30
|
TMSNAP = snapshot
|
|
27
31
|
for line in lines[:10]:
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
syslog(line)
|
|
33
|
+
syslog("[LINEMALLOC END]", important=True)
|
|
30
34
|
return True
|
|
31
35
|
|
|
32
36
|
PROC = None
|
|
@@ -37,9 +41,9 @@ def log_openfiles():
|
|
|
37
41
|
PROC = psutil.Process(os.getpid())
|
|
38
42
|
ofz = PROC.open_files()
|
|
39
43
|
if config.log.oflist:
|
|
40
|
-
|
|
44
|
+
syslog("OPEN FILES: %s"%(ofz,), important=True)
|
|
41
45
|
else:
|
|
42
|
-
|
|
46
|
+
syslog("OPEN FILE COUNT: %s"%(len(ofz),), important=True)
|
|
43
47
|
return True
|
|
44
48
|
|
|
45
49
|
def log_kernel():
|
babyweb/requesters.py
CHANGED
babyweb/util/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
from .setters import local, localvars, set_read, set_send, set_redir, set_header, set_close
|
|
2
|
-
from .converters import rec_conv, rdec, renc, setenc, setdec
|
|
2
|
+
from .converters import rec_conv, rdec, renc, setenc, setdec, dec
|
|
3
3
|
from .responders import set_pre_close, do_respond, succeed, succeed_sync, fail, redirect, trysavedresponse, send_file, send_text, send_xml, send_image, send_pdf
|
|
4
4
|
from .loaders import cgi_get, cgi_dump
|
babyweb/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.1"
|
|
1
|
+
__version__ = "0.1.1.2"
|
|
@@ -3,23 +3,23 @@ babyweb/config.py,sha256=eCvjUDqgRxOg8c8puKdf1rSrJFL87GwZVX3dclSF_ic,1025
|
|
|
3
3
|
babyweb/controller.py,sha256=zuP_h0y9o2G98QVp_DqtgPDPOJIzGARizQzG5Aozv-g,2734
|
|
4
4
|
babyweb/cron.py,sha256=wQTtY3ZJBeTjvQFbMDmR83c-aQjfEmulzeBWKUob55E,4243
|
|
5
5
|
babyweb/daemons.py,sha256=z1mXDw9AmDPFr-G6517CaysrFZB9HiXfUAxtOdIiWow,1955
|
|
6
|
-
babyweb/logger.py,sha256=
|
|
6
|
+
babyweb/logger.py,sha256=N3wWYF-yU1DqnxL7OkE2XZVf0-57dSfluTjk2U8Xgk0,1071
|
|
7
7
|
babyweb/mail.py,sha256=A7FL99zDU9Y_LAZPpw9-LWOsxuc1eoiGMN1EYVrwOIo,607
|
|
8
8
|
babyweb/memcache.py,sha256=W6JWcBjJPZx8RPYQXYRbCWMl-ziwy9OtzCvxV9RlCXs,484
|
|
9
|
-
babyweb/requesters.py,sha256=
|
|
9
|
+
babyweb/requesters.py,sha256=vE_nXVna8W-t5CWp672Zzuqrxy5VPzKntDk58_W64TI,3202
|
|
10
10
|
babyweb/response.py,sha256=_2hY9ib39MG59nvLDKD37pNCFF9ENuydegBQsd0KV18,2328
|
|
11
11
|
babyweb/routes.py,sha256=V9EQKjWqbwWrR1t4Ren9IGAcmcS5awYCIHdseWoEqVU,483
|
|
12
12
|
babyweb/server.py,sha256=iK0bORQGrO2sZxBcSDl9_ACNGlBVpuKh9XR-TwigGWI,1579
|
|
13
13
|
babyweb/shield.py,sha256=uB4vDKf6jKwWIebAjitm_q9T86iKPRKPNNeKcPgLfrE,1551
|
|
14
14
|
babyweb/sms.py,sha256=lYQFgpFjAas1XIolE0QC4ro2wgXH7hruzV1Dxz72-sE,299
|
|
15
|
-
babyweb/version.py,sha256=
|
|
16
|
-
babyweb/util/__init__.py,sha256=
|
|
15
|
+
babyweb/version.py,sha256=K6t5sr7x1FNBF3IBpOR-NvjIgqfifHqrmH8oln0nZ2s,23
|
|
16
|
+
babyweb/util/__init__.py,sha256=LWPdEVAVSq9NE7SHH434tlb517B4DfUFIWAc25QECI8,357
|
|
17
17
|
babyweb/util/converters.py,sha256=tvAppsy79lrhkOi3E2LkdBpEJ__j0H22RSiKJHssMGs,1579
|
|
18
18
|
babyweb/util/loaders.py,sha256=kMNxQ-hN-oJVgrOU8TQU8LSqp6B3wMoUKOpgS1D5R6Y,1752
|
|
19
19
|
babyweb/util/responders.py,sha256=A8RF3AR32H9z3YAEFCTmIQQuQ_yUoSub7u0Txnv8YYk,6194
|
|
20
20
|
babyweb/util/setters.py,sha256=xIHtdLQgdlyCUC83q3ZW8ab6U5Rj3UU6ZgK70b-TOg4,337
|
|
21
|
-
babyweb-0.1.1.dist-info/LICENSE,sha256=TCGFq2RZnPZed3cKBhfq8EIxNzHcwJWJsBW8p9y1dDk,1068
|
|
22
|
-
babyweb-0.1.1.dist-info/METADATA,sha256=
|
|
23
|
-
babyweb-0.1.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
24
|
-
babyweb-0.1.1.dist-info/top_level.txt,sha256=-KcZVMe9-tSS5gwyDZGyLvU5bemV6aWTSofb0B37Mts,8
|
|
25
|
-
babyweb-0.1.1.dist-info/RECORD,,
|
|
21
|
+
babyweb-0.1.1.2.dist-info/LICENSE,sha256=TCGFq2RZnPZed3cKBhfq8EIxNzHcwJWJsBW8p9y1dDk,1068
|
|
22
|
+
babyweb-0.1.1.2.dist-info/METADATA,sha256=VEdL8RQSBgeVY_CZcQTmjbUL1om0rZEM1CrYCq3Z_ko,729
|
|
23
|
+
babyweb-0.1.1.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
24
|
+
babyweb-0.1.1.2.dist-info/top_level.txt,sha256=-KcZVMe9-tSS5gwyDZGyLvU5bemV6aWTSofb0B37Mts,8
|
|
25
|
+
babyweb-0.1.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|