Mantis - Resin
Viewing Issue Advanced Details
356 minor always 08-18-05 00:00 11-30-05 14:42
sergek  
 
normal  
closed 3.0.14  
3.0.14 fixed  
none    
none 3.0.15  
0000356: Bean init and XML validation on access-log bugs
RSN-400
The docs on http://www.caucho.com/resin-3.0/config/log.xtp#access-log [^] for a custom resin-type accesslog are rather incorrect.

First, path and path-format are required according to the XML validation. The example provided and the custom access log type I wrote do not use these parameters, so this is superfluous setting. Those settings should probably be moved from AbstractAccessLog to AccessLog.

Second, the table of attributes for access-log says that resin-type needs to specify a class that extends com.caucho.server.log.AccessLog. Later on you say com.caucho.server.log.AbstractAccessLog.

Third, the sample is just really broken XML, but that's pretty easy to sort out. Aside from syntactically not XML, you offer a href attribute, which is not allowed by the XML validation.

Fourth, and really the only reason I really care that much, is that the <init> block does not work. When you try to use bean-style initialization, you get 'init' is an unknown property of 'com.prestosports.resin.ExecAccessLog'.

Sample conf:

<access-log path=""
    resin:type="com.prestosports.resin.ExecAccessLog">
  <init>
    <command>cat</command>
    <format>%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" "%{Host}i"</format>
  </init>
</access-log>

I need Resin to be able to support a custom access log to remove Apache in front of Resin, which would be fantastic. Please fix these hopefully minor configuration issues. Once that's workable, I'll submit a patch for my custom access log to pipe access logs to a command line exec.
Fedora core 3, JDK 1.5.0_02

Notes
(0000411)
sergek   
08-18-05 00:00   
Unfortunately realized that you cannot extend com.caucho.server.log.AbstractAccessLog. You have to extend AccessLog.
(0000412)
ferg   
08-18-05 00:00   
server/021t