Configure haufe.requestmonitoring

Can anyone help me with hints for the debugging tool haufe.requestmonitoring?

my buildout:

eggs =
zcml =

zope-conf-additional =
    %import haufe.requestmonitoring
    <product-config timelogging>
        filebase ${buildout:var-dir}/${:_buildout_section_name_}/timelogging
    <product-config successlogging>
        filebase ${buildout:var-dir}/${:_buildout_section_name_}/successlogging
    <requestmonitor requestmonitor>
        period 5s
        verbosity 2
        <monitorhandler dumper>
            factory haufe.requestmonitoring.DumpTraceback.factory
            # 0 --> no repetition
            repeat -1
            time 3s

if i start my zeoclients i see this in my event.log:

2021-10-05 14:29:27,644 INFO    [chameleon.config:38][MainThread] directory cache: /opt/mysite/var/cache.
2021-10-05 14:29:28,130 INFO    [ZEO.ClientStorage:202][MainThread] zeostorage ClientStorage (pid=641794) created RW/normal for storage: '1'
2021-10-05 14:29:28,130 INFO    [ZEO.cache:208][MainThread] created temporary cache file 5
2021-10-05 14:29:28,134 INFO    [ZEO.asyncio.base:51][zeostorage zeo client networking thread] Connected Protocol(('', 8100), '1', False)
2021-10-05 14:29:28,139 INFO    [ZEO.ClientStorage:362][zeostorage zeo client networking thread] zeostorage Connected to storage: ('localhost', 8100)
2021-10-05 14:29:31,574 INFO    [Zope:42][MainThread] Ready to handle requests
2021-10-05 14:29:31,574 INFO    [RequestMonitor:78][Dummy-1] RequestMonitor started
2021-10-05 14:29:31,577 INFO    [waitress:485][MainThread] Serving on
2021-10-05 14:29:31,577 INFO    [waitress:485][MainThread] Serving on
2021-10-05 14:30:01,605 INFO    [RequestMonitor:91][Dummy-1] monitoring 1 requests

In the the timelogging file i see this:

211005T145816   0     0.0000 +    143 /VirtualHostBase/https/mysite.local:443/mysite/VirtualHostRoot/path1
211005T145816   0     0.0000 +    144 /VirtualHostBase/https/mysite.local:443/mysite/VirtualHostRoot/path2
211005T145816   0     0.0000 +    145 /VirtualHostBase/https/mysite.local:443/mysite/VirtualHostRoot/and_so_on

But in the successlogging_good and successlogging_bad file i see only a line with ******** ?

Does anyone know what is missing to see a human readable output in the successlogging files?

Please read the README documentation on of this module. haufe.requestmonitoring · PyPI

Success request logging

This logging writes two files _good. and _bad.. For each request, a character is written to either the good or the bad logfile, depending on whether the request was successful or unsuccessful. This means, that only the file size matters for these logfiles.

Seems to work as intended.

1 Like

Plone Foundation Code of Conduct