Yes, but to do so you need to read the logging documentation and come up with an approach that works for you in the Python stdlib logging module [1]. One option is to configure a filter and another is a logging adapter or even a custom formatter. The simplest approach is probably a custom formatter that uses pyramid.threadlocal.get_current_request() to inject extra formatting options into the record but I do not have any sample code to give you. The most difficult approach is to add a filter because it is not possible to configure filters from the ini file.
[1] https://docs.python.org/3/library/logging.html On Fri, May 26, 2017 at 10:04 PM, Guohuang Chen <chen.guohu...@gmail.com> wrote: > can i add something to the pyramid logging ? such as session['login_name'] > remote-ip ... > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pylons-discuss+unsubscr...@googlegroups.com. > To post to this group, send email to pylons-discuss@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/pylons-discuss/4a758c61-1f22-460a-bde9-a4e047d8e389% > 40googlegroups.com > <https://groups.google.com/d/msgid/pylons-discuss/4a758c61-1f22-460a-bde9-a4e047d8e389%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwH6m26%3D0wyctjx45bFfCuQ5F6%2BNh0jrF5PBJXdnJG3t0Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.