Problems with the tomcat access-logs

1

I need your help.

I want to log the access on my Apache Tomcat webserver on SLES 12. It is running and logging normally. But when I visit the site, tomcat is writing 8 lines into the localhost_access_log.txt file. Like this:

10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET / HTTP/1.1" 200 11250
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /tomcat.css HTTP/1.1" 200 5576
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /tomcat.png HTTP/1.1" 200 5103
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /favicon.ico HTTP/1.1" 200 21630
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /bg-nav.png HTTP/1.1" 200 1401
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /asf-logo.png HTTP/1.1" 200 17811
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /bg-middle.png HTTP/1.1" 200 1918
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /bg-button.png HTTP/1.1" 200 713
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /bg-upper.png HTTP/1.1" 200 3103
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /favicon.ico HTTP/1.1" 206 21630
10.XXX.XX.XXX - - [27/Jul/2016:08:28:29 +0200] "GET /favicon.ico HTTP/1.1" 200 21630

The same when I logged in as an admin, then tomcat write 5 lines.


10.XXX.XX.XXX - - [27/Jul/2016:10:37:01 +0200] "GET /manager/status HTTP/1.1" 401 2473
10.XXX.XX.XXX - admin [27/Jul/2016:10:37:02 +0200] "GET /manager/status HTTP/1.1" 200 7010
10.XXX.XX.XXX - - [27/Jul/2016:10:37:03 +0200] "GET /manager/images/tomcat.gif HTTP/1.1" 200 2066
10.XXX.XX.XXX - - [27/Jul/2016:10:37:03 +0200] "GET /manager/images/asf-logo.gif HTTP/1.1" 200 7279
10.XXX.XX.XXX - - [27/Jul/2016:10:37:03 +0200] "GET /favicon.ico HTTP/1.1" 200 21630

Now my question:

Is it possible that tomcat writes just one line per access? Or that it writes the log in a personal format? Because I want to analyse the access-logs with graylog2 and graylog2 has some problem with this.

jns

Posted 2016-07-27T09:06:50.737

Reputation: 11

Oh, the XY problem again... http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem/66378

– MariusMatutiae – 2016-07-27T10:47:50.453

Sorry, i dont understand what you mean. – jns – 2016-07-28T11:10:52.120

No answers