<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">I realize this is off topic for this mailing list, but I would very much appreciate you trying </span><a href="https://svn.apache.org/repos/asf/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/" target="_blank" style="color: rgb(0, 0, 204); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">https://svn.apache.org/repos/asf/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/</a><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "> and in particular </span><a href="https://svn.apache.org/repos/asf/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java" target="_blank" style="color: rgb(0, 0, 204); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">https://svn.apache.org/repos/asf/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java</a><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">.</span><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
<br></div><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">If you do give it a try please provide feedback on the log4j developers list, not here.</div><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
<br></div><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">Ralph</div><br><div class="gmail_quote">On Tue, Nov 15, 2011 at 10:12 AM, Steve Cohen <span dir="ltr"><<a href="mailto:scohen@javactivity.org">scohen@javactivity.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Yes, as I indicated, it's a marginal use case.<br>
But<br>
1) logging exceptions in the JMS transmission itself<br>
2) Since the formatting of the message for the legacy logging system is happening in the JMS appender (arguably a suboptimal design) there is a use case for trace logging for development purposes to log the output of the formatting operation.  In production, this would certainly be turned off.<br>

<br>
<br>
On 11/15/2011 10:32 AM, TJ Rothwell wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I must be missing something. Why the need to originate new logging messages<br>
from the appender? Any status updates you could do through ContextAware<br>
methods; any custom work to the JMS Queue would occur in that appender. So<br>
I don't understand the need for creating additional logging messages. If<br>
the appender is acting as a filter so some messages can be processed by a<br>
different appender, then a filter would help. [1]<br>
<br>
I'm glad you have something that works.<br>
<br>
[1] <a href="http://logback.qos.ch/manual/filters.html" target="_blank">http://logback.qos.ch/manual/<u></u>filters.html</a><br>
<br>
-- TJ<br>
<br>
On Tue, Nov 15, 2011 at 7:39 AM, Steve Cohen<<a href="mailto:scohen@javactivity.org" target="_blank">scohen@javactivity.org</a>>  wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It's a JMSQueue-based appender.  It was written for log4j (only recently<br>
have we switched to logback) which didn't have one.  In addition to the JMS<br>
functionality, at the other end of the JMS socket sits a server application<br>
written in C with its own legacy logging system that must be catered to.<br>
  This involves some special formatting and data which is neither necessary<br>
nor desirable for inclusion in the local logging that the client-side<br>
application also needs.  The appender is perhaps the most convenient place<br>
to do this.<br>
<br>
However, I do suppose that I should look at the layout and custom format<br>
specifier supported by logback as a possibly better way to accomplish the<br>
same thing.  But what I have seems to work.<br>
<br>
<br>
On 11/14/2011 09:37 PM, TJ Rothwell wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm curious: what use-case is fulfilled by the additional messages<br>
generated by the appender?<br>
<br>
-- TJ<br>
<br>
On Mon, Nov 14, 2011 at 4:00 PM, Steve Cohen<<a href="mailto:scohen@javactivity.org" target="_blank">scohen@javactivity.org</a>><br>
  wrote:<div class="im"><br>
<br>
  On 11/12/2011 04:14 PM, Steve Cohen wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
  We have a custom appender that may itself need to issue logging<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
statements. But placing a logger in such a class causes various<br>
exceptions on initialization and loading. So we are resorting to<br>
System.out.println for lack of a better solution.<br>
<br>
I suppose there must be a better way.<br>
What would that be?<br>
<br>
<br></div>
______________________________<u></u>****_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/****listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>****listinfo/logback-user</a><<a href="http://mailman.qos.ch/mailman/**listinfo/logback-user" target="_blank">http<u></u>://mailman.qos.ch/mailman/**<u></u>listinfo/logback-user</a>><br>

<http:/**/<a href="http://mailman.qos.ch/mailman/**listinfo/logback-user" target="_blank">mailman.qos.ch/<u></u>mailman/**listinfo/logback-<u></u>user</a><<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/<u></u>mailman/listinfo/logback-user</a>><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote>
<br>
<br>
<br>
  A technique that seems to work is to NOT declare a logger in the<br>
<br>
</blockquote>
Appender class that you want to use one from, but instead create a static<br>
logger instance somewhere that is accessible through static methods.<br>
  That<br>
way the logger does not need to be created at the time of appender<br>
instantiation.<br>
<br>
______________________________<u></u>****_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/****listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>****listinfo/logback-user</a><<a href="http://mailman.qos.ch/mailman/**listinfo/logback-user" target="_blank">http<u></u>://mailman.qos.ch/mailman/**<u></u>listinfo/logback-user</a>><br>

<http:/**/<a href="http://mailman.qos.ch/mailman/**listinfo/logback-user" target="_blank">mailman.qos.ch/<u></u>mailman/**listinfo/logback-<u></u>user</a><<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/<u></u>mailman/listinfo/logback-user</a>><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
<br>
______________________________<u></u>**_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/**listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>**listinfo/logback-user</a><<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http:/<u></u>/mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a>><br>

<br>
</blockquote>
<br>
______________________________<u></u>**_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/**listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>**listinfo/logback-user</a><<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http:/<u></u>/mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a>><br>

<br>
</blockquote><div class="im">
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
______________________________<u></u>_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a><br>
</div></div></blockquote></div><br>