HI Guys,<br><br>Thanks for the replies. What I'm trying to do is implement a tracing module for my application with x levels of tracing that users can set (e.g basic, return types, parameters and so on...). We already use slf4j for logging purposes and we intend using slf4j to output our tracing too.<br>
<br>Due to various issues with our application tracing levels (our custome defined tracing levels - not logging levels) and monitoring local attributes to change this tracing level... and tie-ing this to slff4j log levels and then setting up loggers to handle this on application server the idea was to add more levels to slf4j so that the log level/trace level; could be handled/set by the application server setting e.g set to FINER and so on will get x level of tracing on this Logger handler.. perhaps logger.infoPlus was a bad example.<br>
<br>The reason we are using slf4j is it allows applications using our "application" (it's really just a library that other applications use) use whatever logging implementation they want. <br><br>If I use Markers i think this ties everybody to logback- and is still not really what I'm looking for<br>
<br>Anyway, i don't think using standard levels available on Jboss such as Fine,Finer etc changes things too much from logger.errorPlus ....and your answers are still relevant...<br><br>Thanks for the replies, any other ideas are welcome.<br>
<br>Thanks,<br>Will<br><br><div class="gmail_quote">On Fri, May 11, 2012 at 12:35 PM, ceki <span dir="ltr"><<a href="mailto:ceki@qos.ch" target="_blank">ceki@qos.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 11.05.2012 12:47, Robert Elliot wrote:<br>
<br>
> Short answer: no.<br>
><br>
> Longer answer:<br>
><br></div>
> The point of SLF4J is it's a common facade or interface, you then<div class="im"><br>
> choose an implementation (logback, slf4j-log4j, slf4j-jdk14 etc.).<br>
> Obviously the existing implementations only know about & support the<br>
> levels defined on the existing interface.<br>
<br></div>
Yep, as indicates (or fails to indicate) SLF4J is just an abstraction<br>
layer for logging frameworks.<div class="im"><br>
<br>
> Obviously you could write your own interface that extends the slf4j<br>
> Logger interface and adds those methods, but what would you do with<br>
> the calls to them? To get support for new levels you would need to<br>
> write your own implementation which implements your new interface with<br>
> its new methods. You'd then have a coupling between your custom<br></div>
> implementation and your custom extension of the SLF4J interface, and<div class="im"><br>
> in all probability a tight coupling from your custom implementation to<br>
> an existing logging subsystem that supports defining new levels.<br>
<br></div>
The above could be seen as a critique of abstraction layers or at<br>
least it highlights the difficulty of getting abstractions layers<br>
right.<div class="im"><br>
<br>
> I believe Markers are intended to support some of the use cases that<br>
> might otherwise be achieved by custom log levels.<br>
<br></div>
Correct. Markers give you a another dimension for filtering<br>
events. Instead of the infoPlus level, you would use the PLUS<br>
marker. SLF4J support the following syntax:<br>
<br>
Marker PLUS = MarkerFactory.getMarker("PLUS"<u></u>);<br>
<a href="http://logger.info" target="_blank">logger.info</a>(PLUS, "some message");<br>
<br>
HTH,<span class="HOEnZb"><font color="#888888"><br>
-- <br>
Ceki<br>
<a href="http://twitter.com/#%21/ceki" target="_blank">http://twitter.com/#!/ceki</a></font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
----- Original Message -----<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: "William Shatner"<<a href="mailto:shatner.william@gmail.com" target="_blank">shatner.william@<u></u>gmail.com</a>><br>
To: <a href="mailto:slf4j-user@qos.ch" target="_blank">slf4j-user@qos.ch</a><br>
Sent: Friday, 11 May, 2012 11:27:33 AM<br>
Subject: [slf4j-user] Extend slf4j Tracing Levels<br>
Hi,<br>
<br>
Is it possible to extend slf4j tracing levels to have more fine<br>
grained levels beyond the standard error,info etc.<br>
<br>
e.g<br>
<br>
<a href="http://logger.info" target="_blank">logger.info</a><br>
logger.infoPlus<br>
...<br>
logger.error<br>
logger.error1<br>
logger.error2<br>
<br>
..<br>
<br>
<br>
Thanks,<br>
Will<br>
</blockquote></blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch" target="_blank">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/slf4j-user</a><br>
</div></div></blockquote></div><br>