This content has been marked as final.
Show 9 replies
-
1. Re: IPs and URLs logging in JBoss
dgenkin Aug 5, 2008 6:25 PM (in response to dgenkin)Nobody had to ever log IPs in JBoss?:)
-
2. Re: IPs and URLs logging in JBoss
peterj Aug 6, 2008 4:12 PM (in response to dgenkin)Try uncommenting the RequestDumperValve in server.xml and see if that does it.
In JBossAS 4.2.3, server.xml is located at server/xxx/deploy/jboss-web.deployer -
3. Re: IPs and URLs logging in JBoss
dgenkin Aug 14, 2008 4:51 PM (in response to dgenkin)"PeterJ" wrote:
Try uncommenting the RequestDumperValve in server.xml and see if that does it.
In JBossAS 4.2.3, server.xml is located at server/xxx/deploy/jboss-web.deployer
Thanks, Peter. This provides excessvie logging, unfortunately.
I have found another interesting thing in the server.xml for access logging and this is actually what i need, but i cannot find where i specify the pattern.
Below is this logger funtionality. It has pattern='combined', can be 'common'. Where do i specify this pattern details? I need to add something like this LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined. Then i will log everything i need.
<!-- Access logger -->
-
4. Re: IPs and URLs logging in JBoss
dgenkin Aug 14, 2008 4:55 PM (in response to dgenkin)By some reason it cut my last post. I am reposting it:
"PeterJ" wrote:
Try uncommenting the RequestDumperValve in server.xml and see if that does it.
In JBossAS 4.2.3, server.xml is located at server/xxx/deploy/jboss-web.deployer
Thanks, Peter. This provides excessvie logging, unfortunately.
I have found another interesting thing in the server.xml for access logging and this is actually what i need, but i cannot find where i specify the pattern.
Below is this logger funtionality. It has pattern='combined', can be 'common'. Where do i specify this pattern details? I need to add something like this LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined. Then i will log everything i need.
<!-- Access logger -->
by some reason the details of the access logger are getting cut here, unless i dont remove opening and closing tags, so i had to remove them:
<!--
Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="access_log." suffix=".log"
pattern="combined" directory="/log"
resolveHosts="false"
--> -
5. Re: IPs and URLs logging in JBoss
peterj Aug 14, 2008 6:11 PM (in response to dgenkin)Use the code tags around XML text - select the text and click the Code button under the editor window. And preview the post before submitting it.
-
6. Re: IPs and URLs logging in JBoss
dgenkin Aug 14, 2008 6:16 PM (in response to dgenkin)"PeterJ" wrote:
Use the code tags around XML text - select the text and click the Code button under the editor window. And preview the post before submitting it.
Thanks for the advice. Do you have advice to my other question about where i can modify common and combined patterns used in Access Logger in server.xml? -
7. Re: IPs and URLs logging in JBoss
peterj Aug 14, 2008 6:57 PM (in response to dgenkin)Not having tried it myself, no.
-
8. Re: IPs and URLs logging in JBoss
dgenkin Aug 14, 2008 6:59 PM (in response to dgenkin)"PeterJ" wrote:
Not having tried it myself, no.
ok, thnx. maybe somebody else has.
i was trying to find in google where these directives are defined for server.xml, but no luck.... -
9. Re: IPs and URLs logging in JBoss
dgenkin Aug 18, 2008 5:32 PM (in response to dgenkin)After trials and errors found how to log what i wanted. The following needs to be specified in the server.xml:
<Valve className="org.apache.catalina.valves.AccessLogValve" prefix="access_log." suffix=".log" pattern="%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" directory="$JBOSS_LOGS" resolveHosts="false" />
Note that instead of " i have to use "