It would be nice to know what is in your AuditEvent. I suspect that is where our implementations differ.<br><br><div class="gmail_quote">On Sun, Nov 2, 2008 at 11:42 AM, Anders Hammar <span dir="ltr">&lt;<a href="mailto:anders@hammar.net">anders@hammar.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
Attached is a UML class diagram of the basics of the audit logger<br>
implementation utilizing Logback. As you can see it&#39;s not very<br>
complicated. What I have left out is most of the Joran configuration<br>
parts (you don&#39;t need to use Joran for configuration if you don&#39;t want<br>
to) and our extension of PatternLayoutBase (which uses a bunch of<br>
Converters specific to our case).<br>
<br>
Once again, have a look at logback-access for instance and it<br>
shouldn&#39;t be to hard to figure out.<br>
<font color="#888888"><br>
/Anders<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Fri, Oct 31, 2008 at 1:21 PM, Chad La Joie &lt;chad.lajoie@switch.ch&gt; wrote:<br>
&gt; Thanks. &nbsp;We use Logback for a product with modestly large deployment. &nbsp;I<br>
&gt; have an audit log now but I&#39;m not entirely happy with it. &nbsp;Event-based<br>
&gt; log entries would be a large step in the right direction.<br>
&gt;<br>
&gt; Anders Hammar wrote:<br>
&gt;&gt; Hi Chad,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m sorry to say no, my customer doesn&#39;t share code. Especially not<br>
&gt;&gt; for this component. But due to the good design of logback this was<br>
&gt;&gt; very straight forward. As I said, I used logback-core and implemented<br>
&gt;&gt; a few classes on top of this. I found looking at how things were<br>
&gt;&gt; solved in logback-classic and logback-access very helpful. I ran into<br>
&gt;&gt; a few problems when extending some classes for our specific needs, but<br>
&gt;&gt; I filed jiras regarding that and I believe it has been fixed in<br>
&gt;&gt; 0.9.10/11.<br>
&gt;&gt;<br>
&gt;&gt; What I could do is sharing some kind of UML class diagram to show the<br>
&gt;&gt; idea. I&#39;ll look at that on Monday.<br>
&gt;&gt;<br>
&gt;&gt; /Anders<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Oct 31, 2008 at 9:45 AM, Chad La Joie &lt;chad.lajoie@switch.ch&gt; wrote:<br>
&gt;&gt;&gt; Hey Anders,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Do you have any code that you could share that shows how you did the<br>
&gt;&gt;&gt; event-based audit logging vs the standard level-based?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Anders Hammar wrote:<br>
&gt;&gt;&gt;&gt; I was asked by Ceki to share my successful Logback story with you all.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; In a former assignment for one of our customers, we implemented an<br>
&gt;&gt;&gt;&gt; audit component. The customer is to use this component in their<br>
&gt;&gt;&gt;&gt; applications to audit end-user activities.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; In some earlier application specific audit implementations, log4j had<br>
&gt;&gt;&gt;&gt; been used. However, log4j (and pretty much all existing application<br>
&gt;&gt;&gt;&gt; logging frameworks that I looked at) has the notion of logging levels.<br>
&gt;&gt;&gt;&gt; For auditing (at least in this customer&#39;s case) we have actions/events<br>
&gt;&gt;&gt;&gt; which have no relation between them. So, having levels of debug, info,<br>
&gt;&gt;&gt;&gt; warn, etc isn&#39;t right but we rather have independent events.<br>
&gt;&gt;&gt;&gt; When I found Logback it was kind of love at first sight, the modular<br>
&gt;&gt;&gt;&gt; design fitted beautifully with what we wanted and we chose Logback<br>
&gt;&gt;&gt;&gt; (specifically logback-core) for our actual audit logging. We based<br>
&gt;&gt;&gt;&gt; this choice on two factors in specific:<br>
&gt;&gt;&gt;&gt; 1. The possibility of log on actions/events rather than levels (as<br>
&gt;&gt;&gt;&gt; above described)<br>
&gt;&gt;&gt;&gt; 2. The possiblity of having several independently configured logback<br>
&gt;&gt;&gt;&gt; instances. (This is not possible with log4j for instance, and as the<br>
&gt;&gt;&gt;&gt; customer&#39;s app server of choice uses log4j we would need to combine<br>
&gt;&gt;&gt;&gt; application logging and audit logging configuration - which is not<br>
&gt;&gt;&gt;&gt; good out of security perspective.)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Also, the extensive documentation made my work easy to recommend the<br>
&gt;&gt;&gt;&gt; framework. As we all know, good documentation is not always the case<br>
&gt;&gt;&gt;&gt; in OSS. However, as mentioned on the mailing list earlier, the lack of<br>
&gt;&gt;&gt;&gt; a 1.0 release could have been a problem. However, Ceki&#39;s track record<br>
&gt;&gt;&gt;&gt; (with log4j) made me feel safe still going with Logback.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; As i personally strongly believe in OSS I normally participate and<br>
&gt;&gt;&gt;&gt; contribute to the community of the libs I use. However, working as a<br>
&gt;&gt;&gt;&gt; consultant I just can&#39;t be involved in everything and tend to only<br>
&gt;&gt;&gt;&gt; stay active as long as the assignment lasts (there are a few<br>
&gt;&gt;&gt;&gt; exceptions). Therefore I don&#39;t subscribe to this mailing list any<br>
&gt;&gt;&gt;&gt; longer, but I will monitor this thread so if you have any questions<br>
&gt;&gt;&gt;&gt; regarding my use case I&#39;ll be happy to answer them.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; /Anders<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; Logback-user mailing list<br>
&gt;&gt;&gt;&gt; Logback-user@qos.ch<br>
&gt;&gt;&gt;&gt; <a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; SWITCH<br>
&gt;&gt;&gt; Serving Swiss Universities<br>
&gt;&gt;&gt; --------------------------<br>
&gt;&gt;&gt; Chad La Joie, Software Engineer, Net Services<br>
&gt;&gt;&gt; Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland<br>
&gt;&gt;&gt; phone +41 44 268 15 75, fax +41 44 268 15 68<br>
&gt;&gt;&gt; chad.lajoie@switch.ch, <a href="http://www.switch.ch" target="_blank">http://www.switch.ch</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Logback-user mailing list<br>
&gt;&gt;&gt; Logback-user@qos.ch<br>
&gt;&gt;&gt; <a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
&gt;&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Logback-user mailing list<br>
&gt;&gt; Logback-user@qos.ch<br>
&gt;&gt; <a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
&gt;<br>
&gt; --<br>
&gt; SWITCH<br>
&gt; Serving Swiss Universities<br>
&gt; --------------------------<br>
&gt; Chad La Joie, Software Engineer, Net Services<br>
&gt; Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland<br>
&gt; phone +41 44 268 15 75, fax +41 44 268 15 68<br>
&gt; chad.lajoie@switch.ch, <a href="http://www.switch.ch" target="_blank">http://www.switch.ch</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Logback-user mailing list<br>
&gt; Logback-user@qos.ch<br>
&gt; <a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
&gt;<br>
</div></div><br>_______________________________________________<br>
Logback-user mailing list<br>
Logback-user@qos.ch<br>
<a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
<br></blockquote></div><br>