ProtectedLogListener

116 views
Skip to first unread message

saple

unread,
Jun 15, 2009, 9:25:52 PM6/15/09
to jPOS Users
Hi guys, regarding ProtectedLogListener, why is it not hiding the
fields? Is there something wrong with the way on how I use it?

Here is my code:

SimpleConfiguration conf = new SimpleConfiguration();
conf.put("", "modules/examples/validator/logger.xml");
ProtectedLogListener protectedLog = new ProtectedLogListener();
protectedLog.setConfiguration(conf);
logger.addListener(protectedLog);
GenericPackager p = new GenericPackager("modules/examples/validator/
subfield/custombase1.xml");
channel = new VAPChannel(host, 8000, p);
mux = new ISOMUX(channel);
((LogSource) channel).setLogger(logger, "channel");
mux.setLogger(logger, "mux");
mux.setISORequestListener(this);
Thread t = new Thread(mux);
t.start();
return new ISOChannelPanel(channel, host + ":8000");

Thank you guys!...

David Bergert

unread,
Jun 15, 2009, 9:27:23 PM6/15/09
to jpos-...@googlegroups.com
What files are in your configuraiton file ? to Protect ?

David Bergert, CISSP, CISA, CPISM/A
www.paymentsystemsblog.com

On Jun 15, 2009, at 8:25 PM, saple wrote:

protectedLog.setConfiguration(conf);

saple

unread,
Jun 15, 2009, 10:13:35 PM6/15/09
to jPOS Users
Hi thanks for the reply.

<log-listener class="org.jpos.util.ProtectedLogListener">
<property name="protect" value="2 14 35 45 37" />
<property name="wipe" value="52 55 120" />
</log-listener>

and it doesnt output ndi the console unless i change it to
SimpleLogListener.

SimpleConfiguration conf = new SimpleConfiguration();
conf.put("", "modules/examples/validator/logger.xml");
ProtectedLogListener protectedLog = new
ProtectedLogListener();
protectedLog.setConfiguration(conf);
// logger.addListener(protectedLog);
logger.addListener(new SimpleLogListener(System.out));
GenericPackager p = new GenericPackager("modules/
examples/validator/subfield/custombase1.xml");
channel = new VAPChannel(host, 8000, p);
mux = new ISOMUX(channel);
((LogSource) channel).setLogger(logger, "channel");
mux.setLogger(logger, "mux");
mux.setISORequestListener(this);
Thread t = new Thread(mux);
t.start();
return new ISOChannelPanel(channel, host + ":8000");



saple

unread,
Jun 15, 2009, 10:15:04 PM6/15/09
to jPOS Users
This is the whole config file:

<logger name="Q2" class="org.jpos.q2.qbean.LoggerAdaptor">
<log-listener class="org.jpos.util.SimpleLogListener" />

<log-listener class="org.jpos.util.ProtectedLogListener">
<property name="file" value="log/q2.log" />
<property name="protect" value="2 14 35 45 37" />
<property name="wipe" value="52 55 120" />
</log-listener>

<log-listener class="org.jpos.util.RotateLogListener">
<property name="file" value="log/q2.log" />
<property name="window" value="86400" />
<property name="copies" value="90" />
<property name="maxsize" value="100000000" />
</log-listener>
</logger>

Thanks

David Bergert

unread,
Jun 15, 2009, 10:20:37 PM6/15/09
to jpos-...@googlegroups.com
and what is showing in your q2.log ?



David Bergert, CISSP, CISA, CPISM/A
www.paymentsystemsblog.com

saple

unread,
Jun 15, 2009, 10:51:16 PM6/15/09
to jPOS Users
does not log anything.

Initially <property name="file" value="log/q2.log" /> is not there. I
just tried if it will work, unfortunately It does not.


On Jun 16, 10:20 am, David Bergert <dbergert...@gmail.com> wrote:
> and what is showing in your q2.log ?
>
> David Bergert, CISSP, CISA, CPISM/Awww.paymentsystemsblog.com
>

Alejandro Revilla

unread,
Jun 16, 2009, 8:19:27 AM6/16/09
to jpos-...@googlegroups.com
>
> does not log anything.
>
You are probably using a different logger other than 'Q2'.

saple

unread,
Jun 17, 2009, 1:11:48 AM6/17/09
to jPOS Users
Please show me how to implement ProtectedLogListener or how to
implement Q2? Thank you so much.
Reply all
Reply to author
Forward
0 new messages