Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way I can track the logged in users in geoserver(somewhere in log file). I have same users in geoserver and tomcat-realm.As I can see what URI are requested, IP address URI requested from, time and other info in access log of apache. But I need to find user name who logged in to request those URI.


share|improve this question
Can you pass the user.ID variable to the log you're already maintaining? I assume if the instance is running and the user is logged in, their user.ID variable will be stored somewhere. – dassouki Jan 6 '12 at 19:42
up vote 2 down vote accepted

Edit the tomcat configuration file (in conf/server.xml) and add an AccessLog Valve.

The common log format already logs the username along with url and is common in the sense that most log processing tool can process it out of the box.

share|improve this answer
I had already added accesslog valve in server.xml file of tomat, but all the time I didn't notice the username was tracked there in access log of tomcat. Thanks a lot guys for the good hints guys. – panalbish Jan 8 '12 at 16:14
Also I would like to add that, I was getting the local apache IP as client IP in tomcat access log, so I modified the server.xml to get the remote client IP using %{X-Forwarded-For}i header in log pattern. Hope it will be helpful for someone having same issue. Thanks – panalbish Jan 8 '12 at 19:25
@panalbish for that a better solution is the remoteip valve… – unicoletti Jan 9 '12 at 13:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.