cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

How to log requests by a particular user in apache in a separate log file

vimalkumar.ajit
1-Visitor

How to log requests by a particular user in apache in a separate log file

Hi All,


I would want to track servlet/RPC requests in a separate log. Is there a way to write this request to a different log.



Regards,


Vimal

3 REPLIES 3

I don't know of a way to do this at the Apache level. It may be
possible, but I don't know of such a feature in Apache.

That said, in recent Windchill releases you can use the FilteredLogger
MBean to log only servlet requests which match a specified URI pattern
and/or those for particular users to a separate logger. This logger can
be directed to a separate file. The regular servlet request logging is
still performed, but the filtered logging can be at a higher verbosity
than the regular logging -- so typically you'd have errors getting
logged to both loggers and info-level logging logged only to the
filtered logger. You can actually add additional filtered logger MBeans
besides the instance which is present out-of-the-box.

--
Jess Holle

Jess,
Are you referring to this MBean in attached screenshot. if yes, can you
please let me know how to configure it.

Regards,
Vimal



No, that's a different MBean.

The one I'm referring to is specific to servlet requests and thus is in
the servlet engine, not the method server (except in R10 and higher, of
course, where the servlet engine itself is in the method server).

The MBean you've found is a bit different -- it allow you to increase
the verbosity of one or more logs for a single user while leaving that
verbosity low for other users. It's a bit complicated to use,
unfortunately, and doesn't sound like what you're after, so I'll not
belabor it's usage here.

Also, as a general matter I'd suggest using VisualVM rather than
jconsole unless you're unfortunate enough to be on AIX (where VisualVM
does not run). It's MBean tree is easier to find through than the
jconsole in Java 6 and it has additional features elsewhere. If you're
using jconsole because that's what SMJconsole and SEJconsole use, then
be aware that in R9.1 M040 and higher there are equivalent SMVisualVM
and SEVisualVM utilities.

--
Jess Holle

Announcements


Top Tags