These are chat archives for cherrypy/cherrypy

17th
Oct 2018
the7erm
@the7erm
Oct 17 2018 18:04

Finally found the solution
https://stackoverflow.com/questions/41879512/cherrypy-is-not-respecting-desired-logging-format/50061286#50061286

Something like this would do it.

cherrypy._cplogging.LogManager.access_log_format = (
       '{t} MYLOG {h} "{r}" {s} {b} "{f}" "{a}"'
       if six.PY3 else
       '%(t)s MYLOG %(h)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
    )
Well sorta.
I think I'm going to end up forking and adding what I need to _cplogging.LogManager
Sviatoslav Sydorenko
@webknjaz
Oct 17 2018 22:40
well, that'd do a static format change, but won't render new data in there.
Maybe logging needs improvements, so feel free to send a PR :)
Sviatoslav Sydorenko
@webknjaz
Oct 17 2018 23:40
@the7erm have you checked remote argument of proxy tool? https://github.com/cherrypy/cherrypy/blob/master/cherrypy/lib/cptools.py#L169-L172
what's your config?