[jpos-users] Can't receive exception in Syslog using SyslogListener

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jpos-users] Can't receive exception in Syslog using SyslogListener

tony1
So I have added this in 00_logger.xml

<?xml version="1.0" encoding="UTF-8"?>
<logger name = "Q2" class = "org.jpos.q2.qbean.LoggerAdaptor">
 
<log-listener class="org.jpos.util.SysLogListener">
 
<property name="facility" value="21" />
 
<property name="severity" value="5" />
 
<property name="tags" value="audit, syslog" />
 
<property name="prefix" value="[jPOS]" />
 
<property name ="host" value ="localhost"/>
 
<property name ="port" value ="514"/>

 
<property name="syslog.facility" value="21" />
 
<property name="syslog.severity" value="5" />

 
<property name="audit.facility" value="21" />
 
<property name="audit.severity" value="4" />
 
</log-listener>
</logger>



In TestingMux.java, I extends to TransSupport, where the TransSupport extends to Log


@Override
public void setConfiguration(Configuration c) throws ConfigurationException {
 
try {
 mux
= QMUX.getMUX("clientsimulator-mux");
 
} catch (NameRegistrar.NotFoundException ex) {
 org
.jpos.util.Logger.getLogger(ex.toString());
 
System.out.println(ex);
 
}
}

I get org.jpos.util.NameRegistrar$NotFoundException: mux.clientsimulator-mux in IDE console, but nothing was print in syslog. What I have missed here ?

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Can't receive exception in Syslog using SyslogListener

Sumeet Phadnis

You need to log the event and since TxnSupport extends Log, instead of org.jpos.util.Logger.getLogger(ex.toString()); just try using error(ex);


On 9 June 2017 at 09:42, LengZai <[hidden email]> wrote:
So I have added this in 00_logger.xml

<?xml version="1.0" encoding="UTF-8"?>
<logger name = "Q2" class = "org.jpos.q2.qbean.LoggerAdaptor">
 
<log-listener class="org.jpos.util.SysLogListener">
 
<property name="facility" value="21" />
 
<property name="severity" value="5" />
 
<property name="tags" value="audit, syslog" />
 
<property name="prefix" value="[jPOS]" />
 
<property name ="host" value ="localhost"/>
 
<property name ="port" value ="514"/>

 
<property name="syslog.facility" value="21" />
 
<property name="syslog.severity" value="5" />

 
<property name="audit.facility" value="21" />
 
<property name="audit.severity" value="4" />
 
</log-listener>
</logger>



In TestingMux.java, I extends to TransSupport, where the TransSupport extends to Log


@Override
public void setConfiguration(Configuration c) throws ConfigurationException {
 
try {
 mux
= QMUX.getMUX("clientsimulator-mux");
 
} catch (NameRegistrar.NotFoundException ex) {
 org
.jpos.util.Logger.getLogger(ex.toString());
 
System.out.println(ex);
 
}
}

I get org.jpos.util.NameRegistrar$NotFoundException: mux.clientsimulator-mux in IDE console, but nothing was print in syslog. What I have missed here ?

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAB8U3nfnu7kmFr%3DzJqK1XBJGgc38S8LVwCjCyTPQ8vd9uXRXgg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Can't receive exception in Syslog using SyslogListener

tony1
I tried, but I only see the error in the console, not in syslog. Anything I missed ?

在 2017年6月9日星期五 UTC+8下午1:19:22,Sumeet Phadnis写道:

You need to log the event and since TxnSupport extends Log, instead of org.jpos.util.Logger.getLogger(ex.toString()); just try using error(ex);


On 9 June 2017 at 09:42, LengZai <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="l6MhCvF1BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">nick_s...@...> wrote:
So I have added this in 00_logger.xml

<?xml version="1.0" encoding="UTF-8"?>
<logger name = "Q2" class = "org.jpos.q2.qbean.LoggerAdaptor">
 
<log-listener class="org.jpos.util.SysLogListener">
 
<property name="facility" value="21" />
 
<property name="severity" value="5" />
 
<property name="tags" value="audit, syslog" />
 
<property name="prefix" value="[jPOS]" />
 
<property name ="host" value ="localhost"/>
 
<property name ="port" value ="514"/>

 
<property name="syslog.facility" value="21" />
 
<property name="syslog.severity" value="5" />

 
<property name="audit.facility" value="21" />
 
<property name="audit.severity" value="4" />
 
</log-listener>
</logger>



In TestingMux.java, I extends to TransSupport, where the TransSupport extends to Log


@Override
public void setConfiguration(Configuration c) throws ConfigurationException {
 
try {
 mux
= QMUX.getMUX("clientsimulator-mux");
 
} catch (NameRegistrar.NotFoundException ex) {
 org
.jpos.util.Logger.getLogger(ex.toString());
 
System.out.println(ex);
 
}
}

I get org.jpos.util.NameRegistrar$NotFoundException: mux.clientsimulator-mux in IDE console, but nothing was print in syslog. What I have missed here ?

--
--
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: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="l6MhCvF1BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sa...@...
---
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="l6MhCvF1BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jpos-users+...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="l6MhCvF1BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jpos-...@....
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5e0586be-c9b8-45b5-9e5a-678ad3da8f08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Can't receive exception in Syslog using SyslogListener

tony1
bump

在 2017年6月9日星期五 UTC+8下午3:37:31,LengZai写道:
I tried, but I only see the error in the console, not in syslog. Anything I missed ?

在 2017年6月9日星期五 UTC+8下午1:19:22,Sumeet Phadnis写道:

You need to log the event and since TxnSupport extends Log, instead of org.jpos.util.Logger.getLogger(ex.toString()); just try using error(ex);


On 9 June 2017 at 09:42, LengZai <[hidden email]> wrote:
So I have added this in 00_logger.xml

<?xml version="1.0" encoding="UTF-8"?>
<logger name = "Q2" class = "org.jpos.q2.qbean.LoggerAdaptor">
 
<log-listener class="org.jpos.util.SysLogListener">
 
<property name="facility" value="21" />
 
<property name="severity" value="5" />
 
<property name="tags" value="audit, syslog" />
 
<property name="prefix" value="[jPOS]" />
 
<property name ="host" value ="localhost"/>
 
<property name ="port" value ="514"/>

 
<property name="syslog.facility" value="21" />
 
<property name="syslog.severity" value="5" />

 
<property name="audit.facility" value="21" />
 
<property name="audit.severity" value="4" />
 
</log-listener>
</logger>



In TestingMux.java, I extends to TransSupport, where the TransSupport extends to Log


@Override
public void setConfiguration(Configuration c) throws ConfigurationException {
 
try {
 mux
= QMUX.getMUX("clientsimulator-mux");
 
} catch (NameRegistrar.NotFoundException ex) {
 org
.jpos.util.Logger.getLogger(ex.toString());
 
System.out.println(ex);
 
}
}

I get org.jpos.util.NameRegistrar$NotFoundException: mux.clientsimulator-mux in IDE console, but nothing was print in syslog. What I have missed here ?

--
--
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: [hidden email]
---
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 post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/9a4e6a71-6b09-4eea-8466-aa5d2d9bb095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Can't receive exception in Syslog using SyslogListener

Alejandro Revilla
What do you mean or try to achieve when you say "bump" to over 1000+ users in this list?

Please clarify before we get back to help you with your syslog issue.

On Fri, Jun 9, 2017 at 05:31 LengZai <[hidden email]> wrote:
bump

在 2017年6月9日星期五 UTC+8下午3:37:31,LengZai写道:
I tried, but I only see the error in the console, not in syslog. Anything I missed ?

在 2017年6月9日星期五 UTC+8下午1:19:22,Sumeet Phadnis写道:

You need to log the event and since TxnSupport extends Log, instead of org.jpos.util.Logger.getLogger(ex.toString()); just try using error(ex);


On 9 June 2017 at 09:42, LengZai <[hidden email]> wrote:
So I have added this in 00_logger.xml

<?xml version="1.0" encoding="UTF-8"?>
<logger name = "Q2" class = "org.jpos.q2.qbean.LoggerAdaptor">
 
<log-listener class="org.jpos.util.SysLogListener">
 
<property name="facility" value="21" />
 
<property name="severity" value="5" />
 
<property name="tags" value="audit, syslog" />
 
<property name="prefix" value="[jPOS]" />
 
<property name ="host" value ="localhost"/>
 
<property name ="port" value ="514"/>

 
<property name="syslog.facility" value="21" />
 
<property name="syslog.severity" value="5" />

 
<property name="audit.facility" value="21" />
 
<property name="audit.severity" value="4" />
 
</log-listener>
</logger>



In TestingMux.java, I extends to TransSupport, where the TransSupport extends to Log


@Override
public void setConfiguration(Configuration c) throws ConfigurationException {
 
try {
 mux
= QMUX.getMUX("clientsimulator-mux");
 
} catch (NameRegistrar.NotFoundException ex) {
 org
.jpos.util.Logger.getLogger(ex.toString());
 
System.out.println(ex);
 
}
}

I get org.jpos.util.NameRegistrar$NotFoundException: mux.clientsimulator-mux in IDE console, but nothing was print in syslog. What I have missed here ?

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/9a4e6a71-6b09-4eea-8466-aa5d2d9bb095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAAgSK%3DkBru58NxgE6%3D6s2PykQfGYABwgucwt1mbdbBwgJHkKTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Can't receive exception in Syslog using SyslogListener

Andrés Alcarraz
In reply to this post by tony1

Did you set a logger to your participant?

In you transaction participant xml definition you need to add the attributes logger="Q2" realm="some-identifying-string" so that the logger is assigned to your participant instance.

For example:

<participant class="your.package.TestingMux" logger="Q2" realm="testingmux-participant"/>

El 09/06/17 a las 05:31, LengZai escribió:
bump

在 2017年6月9日星期五 UTC+8下午3:37:31,LengZai写道:
I tried, but I only see the error in the console, not in syslog. Anything I missed ?

在 2017年6月9日星期五 UTC+8下午1:19:22,Sumeet Phadnis写道:

You need to log the event and since TxnSupport extends Log, instead of org.jpos.util.Logger.getLogger(ex.toString()); just try using error(ex);


On 9 June 2017 at 09:42, LengZai <[hidden email]> wrote:
So I have added this in 00_logger.xml

<?xml version="1.0" encoding="UTF-8"?> <logger name = "Q2" class = "org.jpos.q2.qbean.LoggerAdaptor">  <log-listener class="org.jpos.util.SysLogListener">  <property name="facility" value="21" />  <property name="severity" value="5" />  <property name="tags" value="audit, syslog" />  <property name="prefix" value="[jPOS]" />  <property name ="host" value ="localhost"/>  <property name ="port" value ="514"/>  <property name="syslog.facility" value="21" />  <property name="syslog.severity" value="5" />  <property name="audit.facility" value="21" />  <property name="audit.severity" value="4" />  </log-listener> </logger>
In TestingMux.java, I extends to TransSupport, where the TransSupport extends to Log
@Override public void setConfiguration(Configuration c) throws ConfigurationException {  try {  mux = QMUX.getMUX("clientsimulator-mux");  } catch (NameRegistrar.NotFoundException ex) {  org.jpos.util.Logger.getLogger(ex.toString());  System.out.println(ex);  } }
I get org.jpos.util.NameRegistrar$NotFoundException: mux.clientsimulator-mux in IDE console, but nothing was print in syslog. What I have missed here ?
--
--
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: [hidden email]
---
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 post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" onclick="this.href='https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" moz-do-not-send="true">https://groups.google.com/d/msgid/jpos-users/356ba2a2-525c-4d59-b295-30f9da49849b%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;" moz-do-not-send="true">https://groups.google.com/d/optout.

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/9a4e6a71-6b09-4eea-8466-aa5d2d9bb095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/7f6fb744-6f11-c66b-4060-fdde11686b6c%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[jpos-users] Re: Can't receive exception in Syslog using SyslogListener

tony1
In reply to this post by tony1
Thanks guys for the responses. I have solved it.  I change
org.jpos.util.Logger.getLogger(ex.toString());

to
error(ex)

, and add the error tag in
00_logger.xml

<property name="tags" value="audit, syslog,error" />

The problem solved.

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/84e4e1b0-60a7-4116-9768-67caa5a9de37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.