Is there a specific reason for EventLogger to take a StructuredDataMessage, or can we change it to take a Message to make it more generic?
On Thu, Oct 15, 2015 at 2:13 PM, Mikael Ståldal <[email protected]> wrote: > I think this code is quite ugly: > StructuredDataMessage msg = new StructuredDataMessage(confirm, null, > "transfer"); > msg.put("toAccount", toAccount); > msg.put("fromAccount", fromAccount); > msg.put("amount", amount); > EventLogger.logEvent(msg); > > I would like to be able to do this in one statement. Perhaps we can > extend MapMessage to use a build pattern so you can do something like this: > EventLogger.logEvent( > new StructuredDataMessage(confirm, null, "transfer") > .withValue("toAccount", toAccount) > .withValue("fromAccount", fromAccount) > .withValue("amount", amount) > ); > > > On Thu, Oct 15, 2015 at 4:57 AM, Ralph Goers <[email protected]> > wrote: > >> See http://logging.apache.org/log4j/2.x/manual/eventlogging.html. I used >> this as the basis for an audit logging system at my former employer. I have >> every intention of creating a log4j-audit subproject that mimics what was >> done there. I just need some PTO time to work on it…. >> >> Ralph >> >> >> >> On Oct 14, 2015, at 7:52 PM, Matt Sicker <[email protected]> wrote: >> >> Wait, wait, I was missing an important aspect here. Event logging is a >> different concept than location-based logging. Think of it as decentralized >> log messages (somewhat like StatusLogger in that regard). >> >> On 14 October 2015 at 21:51, Matt Sicker <[email protected]> wrote: >> >>> From what I can grok, it looks like a way to log map-like messages in a >>> way that's specified by the new syslog standard. Basically, if you're not >>> using RFC 5424, it does seem confusing. >>> >>> On 16 September 2015 at 10:45, Gary Gregory <[email protected]> >>> wrote: >>> >>>> What is the point of this class? It does so little... what am I missing? >>>> >>>> Some better Javadocs are required to justify its existence IMO. >>>> >>>> Gary >>>> >>>> -- >>>> E-Mail: [email protected] | [email protected] >>>> Java Persistence with Hibernate, Second Edition >>>> <http://www.manning.com/bauer3/> >>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> >>>> Spring Batch in Action <http://www.manning.com/templier/> >>>> Blog: http://garygregory.wordpress.com >>>> Home: http://garygregory.com/ >>>> Tweet! http://twitter.com/GaryGregory >>>> >>> >>> >>> >>> -- >>> Matt Sicker <[email protected]> >>> >> >> >> >> -- >> Matt Sicker <[email protected]> >> >> >> > > > -- > [image: MagineTV] > > *Mikael Ståldal* > Senior software developer > > *Magine TV* > [email protected] > Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com > > Privileged and/or Confidential Information may be contained in this > message. If you are not the addressee indicated in this message > (or responsible for delivery of the message to such a person), you may not > copy or deliver this message to anyone. In such case, > you should destroy this message and kindly notify the sender by reply > email. > -- [image: MagineTV] *Mikael Ståldal* Senior software developer *Magine TV* [email protected] Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email.
