jPos Logger and log4j

615 views
Skip to first unread message

Hendry Se

unread,
Apr 17, 2014, 12:18:11 AM4/17/14
to jpos-...@googlegroups.com
Hello, wanted to ask. do jPos logger support layout and conversion pattern like what log4j have?

Victor Salaman

unread,
Apr 17, 2014, 4:50:44 AM4/17/14
to jpos-...@googlegroups.com
Hi:

The jPOS logger is a different thing altogether. Please get to know it through docs, the source code, examples. It's not meant to replace your traditional logger, although it could if you wanted! In summary, it has a different set of objectives and features that are unique for OUR type of applications. Our log is meant to be parseable... For example, yesterday I had to create a report of transactions which were missing some elements within an ISOMsg opaque field which we don't log in the database. Easy, we ran a program to parse the xml, extract the information and create a report.... Can you do that w/ log4j?

The jPOS logger architecture lets us modify log messages in flight. For example, we could make it so the logger masks or wipes sensitive data before logging an event. Can you automatically do that w/ log4j?

Nonetheless that doesn't mean you can't use another logger alongside. In fact, in the jPOS-EE project we have a 'jposee-logback' module that unifies logging from log4j,commons-logging,slf4j into the logback api. By default in the configuration, the logback messages are routed to the Q2 logger, but you could configure it so it logs to a traditional set of files in the 'log' directory and you'd have the best of both worlds... The reason that I like this approach is that components we use such as Hibernate, JE, etc, they use a traditional logger so when an error occurs I'd like to be able to see what happened without having two files open - I only look at the Q2 log :)

/V   

April 17, 2014 at 12:18 AM
Hello, wanted to ask. do jPos logger support layout and conversion pattern like what log4j have?
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
 
Join us in IRC at http://webchat.freenode.net/?channels=jpos
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/0364d32f-5cde-4373-9099-9ff9f3d9aea2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hendry Se

unread,
Apr 17, 2014, 5:56:51 AM4/17/14
to jpos-...@googlegroups.com
well, can i instead ask, if im using log4jlistener for my jpos.. how do i do something like this for the logging.

Logger
.getRootLogger().addAppender(appender);

its appender switching. could i get some advice?
Reply all
Reply to author
Forward
0 new messages