Author |
|
jnsunkersett
Joined: 30 Jan 2011 Posts: 23
|
Posted: Sat 24 Sep '11 11:21 Post subject: RotateLogs in apache httpd, logfile name should be satic |
|
|
Hi,
I use Apache HTTPD, as a front to my Jboss app-server on a windows O.S
In the CustomLog directive, I am using the the rotateLogs.exe provided with httpd.
Now instead of a single massive access.log, I get new files being generated every day (every 86400 secs), but cannot decipher the naming convention of the log file;
ols.access.log.1316736000, was generated yesterday
ols.access.log.1316822400 was generated today.
Is it possible to have the log file name, static and after every configured interval, the logs gets backedup into a new file.
Similar to Log4J's DailyRollingFileAppender.
thank you
jeevan |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
jnsunkersett
Joined: 30 Jan 2011 Posts: 23
|
Posted: Sun 25 Sep '11 11:55 Post subject: |
|
|
Thank you James.
Not sure if this will help. but let me try it out.
I am using awstats to analyse the log file (and have specified the log file name as ols.access.log).
Not sure, how if specifying a new name everyday is feasible.
thanks again.
Jeevan |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sun 25 Sep '11 14:09 Post subject: |
|
|
Well I use awstats on some server,too. And I parse the logs 2 minutes before rotation. |
|
Back to top |
|
jnsunkersett
Joined: 30 Jan 2011 Posts: 23
|
Posted: Sun 25 Sep '11 15:37 Post subject: |
|
|
great James,
Can you help me with AWSTATS specific questions?
or would you recommend another forum ?
thx
jeevan |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sun 25 Sep '11 15:37 Post subject: |
|
|
Just ask.
Steffen |
|
Back to top |
|
jnsunkersett
Joined: 30 Jan 2011 Posts: 23
|
Posted: Mon 26 Sep '11 9:31 Post subject: |
|
|
Hello james,
I edited the httpd conf, to use %Y etc. (this was as of Sept 25, 5:17 PM )
Code: | CustomLog "|bin/rotatelogs.exe logs/ols.access.%Y-%m-%d.log 86400" combined_with_forwarded_for |
But I still got a log file containing logged data for both Sept25 and Sept 26.(what could I have done wrong ?)
Quote: | 59.177.193.104 - - [25/Sep/2011:23:59:39 +0530] "POST https://10.0.1.9/bookDarshan.do?parameter=bookDarshan HTTP/1.0" 200 27587 "https://online.sai.org.in/bookDarshan.do?parameter=proceed" "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
59.177.193.104 - - [25/Sep/2011:23:59:47 +0530] "POST https://10.0.1.9/bookDarshan.do?parameter=getAvailableDates HTTP/1.0" 200 28410 "https://online.sai.org.in/bookDarshan.do?parameter=bookDarshan" "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
59.177.193.104 - - [25/Sep/2011:23:59:57 +0530] "POST https://10.0.1.9/bookDarshan.do?parameter=getServiceDetails HTTP/1.0" 200 28357 "https://online.sai.org.in/bookDarshan.do?parameter=getAvailableDates" "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
---- this line inserted manually for easier reading ----
59.177.193.104 - - [26/Sep/2011:00:00:07 +0530] "POST https://10.0.1.9/bookDarshan.do?parameter=setServiceTypeDetails HTTP/1.0" 200 28637 "https://online.sai.org.in/bookDarshan.do?parameter=getServiceDetails" "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
117.224.203.196 - - [26/Sep/2011:00:00:19 +0530] "POST https://10.0.1.9/forgotPassword.do?parameter=validateEmailAndDOB HTTP/1.0" 200 17023 "https://online.sai.org.in/forgotPassword.do?parameter=validateEmailAndDOB" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)"
182.156.74.227, 80.239.243.185 - - [26/Sep/2011:00:00:26 +0530] "POST https://10.0.1.9/roomBooking.do?parameter=searchRoomType HTTP/1.0" 200 64887 "https://online.sai.org.in/roomBooking.do?parameter=roomBooking" "Opera/9.80 (Android; Opera Mini/6.1.25655/25.872; U; en) Presto/2.5.25 Version/10.54"
182.156.74.227, 80.239.243.185 - - [26/Sep/2011:00:00:28 +0530] "GET https://10.0.1.9/images/header_bg2.gif HTTP/1.0" 200 1207 "https://online.sai.org.in/roomBooking.do?parameter=searchRoomType" "Opera/9.80 (Android; Opera Mini/6.1.25655/25.872; U; en) Presto/2.5.25 Version/10.54"
117.224.203.196 - - [26/Sep/2011:00:00:33 +0530] "POST https://10.0.1.9/login.do?parameter=login HTTP/1.0" 200 14038 "https://online.sai.org.in/login.do?parameter=reset" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)"
59.177.193.104 - - [26/Sep/2011:00:00:36 +0530] "GET https://10.0.1.9/selectedServices.do?parameter=showSelectedServices HTTP/1.0" 200 14953 "https://online.sai.org.in/bookDarshan.do?parameter=setServiceTypeDetails" "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
jnsunkersett
Joined: 30 Jan 2011 Posts: 23
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 30 Sep '11 15:30 Post subject: |
|
|
Did the offset work for you? |
|
Back to top |
|