In my runtime/logs directory, access_log get created like this:
-rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 Is there a way to force ofbiz to just create "access_log" (w/o the date), and then when logs are rotated, then add the date? I already poked around /framework/base/config/ofbiz-containers.xml (and both-containers.xml), but it still escapes me. Thanks |
Those are created by Catalina. Try searching Tomcat docs.
-Adrian On 6/29/2011 12:49 AM, Mike wrote: > In my runtime/logs directory, access_log get created like this: > > -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 > -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 > -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 > > Is there a way to force ofbiz to just create "access_log" (w/o the > date), and then when logs are rotated, then add the date? > > I already poked around /framework/base/config/ofbiz-containers.xml > (and both-containers.xml), but it still escapes me. > > Thanks |
In reply to this post by Mike Z
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) Mike sent the following on 6/28/2011 4:49 PM: > In my runtime/logs directory, access_log get created like this: > > -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 > -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 > -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 > > Is there a way to force ofbiz to just create "access_log" (w/o the > date), and then when logs are rotated, then add the date? > > I already poked around /framework/base/config/ofbiz-containers.xml > (and both-containers.xml), but it still escapes me. > > Thanks > |
Thanks BJ and Adrian. I was hoping for an easy config change. I'll
probably end up just creating a daily symlink via cron. Thanks. On Wed, Jun 29, 2011 at 6:10 AM, BJ Freeman <[hidden email]> wrote: > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) > at java.lang.Thread.run(Thread.java:619) > > > Mike sent the following on 6/28/2011 4:49 PM: >> In my runtime/logs directory, access_log get created like this: >> >> -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 >> -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 >> -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 >> >> Is there a way to force ofbiz to just create "access_log" (w/o the >> date), and then when logs are rotated, then add the date? >> >> I already poked around /framework/base/config/ofbiz-containers.xml >> (and both-containers.xml), but it still escapes me. >> >> Thanks >> > |
take a look at http://awstats.sourceforge.net/
Mike sent the following on 6/29/2011 7:55 AM: > Thanks BJ and Adrian. I was hoping for an easy config change. I'll > probably end up just creating a daily symlink via cron. Thanks. > > On Wed, Jun 29, 2011 at 6:10 AM, BJ Freeman <[hidden email]> wrote: >> at >> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) >> at >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) >> at >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) >> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) >> at java.lang.Thread.run(Thread.java:619) >> >> >> Mike sent the following on 6/28/2011 4:49 PM: >>> In my runtime/logs directory, access_log get created like this: >>> >>> -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 >>> -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 >>> -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 >>> >>> Is there a way to force ofbiz to just create "access_log" (w/o the >>> date), and then when logs are rotated, then add the date? >>> >>> I already poked around /framework/base/config/ofbiz-containers.xml >>> (and both-containers.xml), but it still escapes me. >>> >>> Thanks >>> >> > |
Thanks BJ, but I wasn't looking for statistics. I'm trying to create
a continuous log tailer that looks for specific things related to security (i.e. lock out an IP that is attempting a scan). Its annoying that the access log is acting different from the other log files, which makes the tailing slightly more tricky. On Wed, Jun 29, 2011 at 10:24 AM, BJ Freeman <[hidden email]> wrote: > take a look at http://awstats.sourceforge.net/ > > Mike sent the following on 6/29/2011 7:55 AM: >> Thanks BJ and Adrian. I was hoping for an easy config change. I'll >> probably end up just creating a daily symlink via cron. Thanks. >> >> On Wed, Jun 29, 2011 at 6:10 AM, BJ Freeman <[hidden email]> wrote: >>> at >>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) >>> at >>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) >>> at >>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) >>> at >>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) >>> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) >>> at java.lang.Thread.run(Thread.java:619) >>> >>> >>> Mike sent the following on 6/28/2011 4:49 PM: >>>> In my runtime/logs directory, access_log get created like this: >>>> >>>> -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 >>>> -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 >>>> -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 >>>> >>>> Is there a way to force ofbiz to just create "access_log" (w/o the >>>> date), and then when logs are rotated, then add the date? >>>> >>>> I already poked around /framework/base/config/ofbiz-containers.xml >>>> (and both-containers.xml), but it still escapes me. >>>> >>>> Thanks >>>> >>> >> > |
I though you might find how they handle taking log files and converting
them to what they use them for. Might be able to use the chunk of code and save you some programming. Mike sent the following on 6/29/2011 11:01 AM: > Thanks BJ, but I wasn't looking for statistics. I'm trying to create > a continuous log tailer that looks for specific things related to > security (i.e. lock out an IP that is attempting a scan). Its > annoying that the access log is acting different from the other log > files, which makes the tailing slightly more tricky. > > On Wed, Jun 29, 2011 at 10:24 AM, BJ Freeman <[hidden email]> wrote: >> take a look at http://awstats.sourceforge.net/ >> >> Mike sent the following on 6/29/2011 7:55 AM: >>> Thanks BJ and Adrian. I was hoping for an easy config change. I'll >>> probably end up just creating a daily symlink via cron. Thanks. >>> >>> On Wed, Jun 29, 2011 at 6:10 AM, BJ Freeman <[hidden email]> wrote: >>>> at >>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) >>>> at >>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) >>>> at >>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) >>>> at >>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) >>>> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) >>>> at java.lang.Thread.run(Thread.java:619) >>>> >>>> >>>> Mike sent the following on 6/28/2011 4:49 PM: >>>>> In my runtime/logs directory, access_log get created like this: >>>>> >>>>> -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 >>>>> -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 >>>>> -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 >>>>> >>>>> Is there a way to force ofbiz to just create "access_log" (w/o the >>>>> date), and then when logs are rotated, then add the date? >>>>> >>>>> I already poked around /framework/base/config/ofbiz-containers.xml >>>>> (and both-containers.xml), but it still escapes me. >>>>> >>>>> Thanks >>>>> >>>> >>> >> > |
In reply to this post by Mike Z
you can also get this info from the session, request, and context objects.
take a look at org.ofbiz.webapp.control.ContextFilter.doFilter which is the first place ofbiz injects into Tomcat. you can write a listener to put in the the Ecommerce webapp that will also achieve the same thing. Mike sent the following on 6/29/2011 11:01 AM: > Thanks BJ, but I wasn't looking for statistics. I'm trying to create > a continuous log tailer that looks for specific things related to > security (i.e. lock out an IP that is attempting a scan). Its > annoying that the access log is acting different from the other log > files, which makes the tailing slightly more tricky. > > On Wed, Jun 29, 2011 at 10:24 AM, BJ Freeman <[hidden email]> wrote: >> take a look at http://awstats.sourceforge.net/ >> >> Mike sent the following on 6/29/2011 7:55 AM: >>> Thanks BJ and Adrian. I was hoping for an easy config change. I'll >>> probably end up just creating a daily symlink via cron. Thanks. >>> >>> On Wed, Jun 29, 2011 at 6:10 AM, BJ Freeman <[hidden email]> wrote: >>>> at >>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) >>>> at >>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) >>>> at >>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) >>>> at >>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) >>>> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) >>>> at java.lang.Thread.run(Thread.java:619) >>>> >>>> >>>> Mike sent the following on 6/28/2011 4:49 PM: >>>>> In my runtime/logs directory, access_log get created like this: >>>>> >>>>> -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 >>>>> -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 >>>>> -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 >>>>> >>>>> Is there a way to force ofbiz to just create "access_log" (w/o the >>>>> date), and then when logs are rotated, then add the date? >>>>> >>>>> I already poked around /framework/base/config/ofbiz-containers.xml >>>>> (and both-containers.xml), but it still escapes me. >>>>> >>>>> Thanks >>>>> >>>> >>> >> > |
Administrator
|
In reply to this post by Mike Z
Mike,
OOTOMH, by default access log are rotated and daily created. So at the end you rotate after one year... See Tomcat log about that, there are parameters http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Access_Log_Valve Also http://web.archiveorange.com/archive/v/yBMRz9VSAifghWMtORNl HTH Jacques From: "Mike" <[hidden email]> > Thanks BJ, but I wasn't looking for statistics. I'm trying to create > a continuous log tailer that looks for specific things related to > security (i.e. lock out an IP that is attempting a scan). Its > annoying that the access log is acting different from the other log > files, which makes the tailing slightly more tricky. > > On Wed, Jun 29, 2011 at 10:24 AM, BJ Freeman <[hidden email]> wrote: >> take a look at http://awstats.sourceforge.net/ >> >> Mike sent the following on 6/29/2011 7:55 AM: >>> Thanks BJ and Adrian. I was hoping for an easy config change. I'll >>> probably end up just creating a daily symlink via cron. Thanks. >>> >>> On Wed, Jun 29, 2011 at 6:10 AM, BJ Freeman <[hidden email]> wrote: >>>> at >>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) >>>> at >>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) >>>> at >>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) >>>> at >>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) >>>> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) >>>> at java.lang.Thread.run(Thread.java:619) >>>> >>>> >>>> Mike sent the following on 6/28/2011 4:49 PM: >>>>> In my runtime/logs directory, access_log get created like this: >>>>> >>>>> -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 >>>>> -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 >>>>> -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28 >>>>> >>>>> Is there a way to force ofbiz to just create "access_log" (w/o the >>>>> date), and then when logs are rotated, then add the date? >>>>> >>>>> I already poked around /framework/base/config/ofbiz-containers.xml >>>>> (and both-containers.xml), but it still escapes me. >>>>> >>>>> Thanks >>>>> >>>> >>> >> > |
Here is what I ended up doing.
$ crontab -l # # Update access_log symlink every 10 minutes # 0/10 * * * * cd /opt/ofbiz/runtime/logs; ln -sf access_log.`date '+%Y-%m-%d'` access_log Seems to work. Thanks. On Wed, Jun 29, 2011 at 11:48 AM, Jacques Le Roux <[hidden email]> wrote: > Mike, > > OOTOMH, by default access log are rotated and daily created. So at the end > you rotate after one year... > See Tomcat log about that, there are parameters > http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Access_Log_Valve > > Also http://web.archiveorange.com/archive/v/yBMRz9VSAifghWMtORNl > > HTH > > Jacques > > From: "Mike" <[hidden email]> >> >> Thanks BJ, but I wasn't looking for statistics. I'm trying to create >> a continuous log tailer that looks for specific things related to >> security (i.e. lock out an IP that is attempting a scan). Its >> annoying that the access log is acting different from the other log >> files, which makes the tailing slightly more tricky. >> >> On Wed, Jun 29, 2011 at 10:24 AM, BJ Freeman <[hidden email]> wrote: >>> >>> take a look at http://awstats.sourceforge.net/ >>> >>> Mike sent the following on 6/29/2011 7:55 AM: >>>> >>>> Thanks BJ and Adrian. I was hoping for an easy config change. I'll >>>> probably end up just creating a daily symlink via cron. Thanks. >>>> >>>> On Wed, Jun 29, 2011 at 6:10 AM, BJ Freeman <[hidden email]> wrote: >>>>> >>>>> at >>>>> >>>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) >>>>> at >>>>> >>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) >>>>> at >>>>> >>>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) >>>>> at >>>>> >>>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) >>>>> at >>>>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) >>>>> at java.lang.Thread.run(Thread.java:619) >>>>> >>>>> >>>>> Mike sent the following on 6/28/2011 4:49 PM: >>>>>> >>>>>> In my runtime/logs directory, access_log get created like this: >>>>>> >>>>>> -rw-rw---- 1 ofbiz ofbiz 72258 2011-06-26 23:58 access_log.2011-06-26 >>>>>> -rw-rw---- 1 ofbiz ofbiz 100759 2011-06-27 23:54 access_log.2011-06-27 >>>>>> -rw-rw---- 1 ofbiz ofbiz 4689194 2011-06-28 16:41 >>>>>> access_log.2011-06-28 >>>>>> >>>>>> Is there a way to force ofbiz to just create "access_log" (w/o the >>>>>> date), and then when logs are rotated, then add the date? >>>>>> >>>>>> I already poked around /framework/base/config/ofbiz-containers.xml >>>>>> (and both-containers.xml), but it still escapes me. >>>>>> >>>>>> Thanks >>>>>> >>>>> >>>> >>> >> > > |
Free forum by Nabble | Edit this page |