Hi Ceki,<br><br>Yes, it appears I didn't have a complete understanding of the concepts. I'd also missed Chapter 7 about the <filter> elements. Thanks to both you and Ralph for the pointers. It's doing exactly what I want now.<br>
<br>Also, congrats on a job well done on LogBack. It's a great improvement to Log4j.<br><br>-Jac<br><br><div class="gmail_quote">On Fri, Apr 8, 2011 at 2:22 AM, Ceki Gulcu <span dir="ltr"><<a href="mailto:ceki@qos.ch">ceki@qos.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello Ralph, Hello Joseph,<br>
<br>
I am under the impression that Joseph is not yet familiar with appender additivity nor logger level inherirance. Both concepts are explained<br>
under Chapter 2: Architecture [1]. Joseph, please rectify if my impression is incorrect.<br>
<br>
[1] <a href="http://logback.qos.ch/manual/architecture.html" target="_blank">http://logback.qos.ch/manual/architecture.html</a><br><font color="#888888">
-- <br>
Ceki<br>
<br>
QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, is looking to hire talented software engineers. For further details, see <a href="http://logback.qos.ch/job.html" target="_blank">http://logback.qos.ch/job.html</a></font><div>
<div></div><div class="h5"><br>
<br>
On 08.04.2011 09:09, Ralph Goers wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
To do this you need the root logger set to level debug and configured<br>
with both appenders. You then have to add a ThresholdFilter to the<br>
Console appender set to level "info".<br>
<br>
Ralph<br>
<br>
On Apr 7, 2011, at 5:13 PM, Joseph Schmoley wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I've got a logback.xml config (pasted below). All I'm trying to do is<br>
have a different logging level, as well as slightly different encoder<br>
pattern, for what shows up in the console vs. what gets written to a file.<br>
<br>
I understand that you have to create 2 different appenders, FILE and<br>
CONSOLE, then set root logger for console only with leve="info", and<br>
create a separate logger referencing FILE appender with a different<br>
logging level.<br>
<br>
I've done this, but I can't figure out how to set the logger name to a<br>
wildcard so I can get "ALL" output directed to the file. You see, just<br>
like the root logger that has no "name", I want that for the <logger><br>
as well, but it requires a name and I've tried putting "*" in it and<br>
it doesn't work. I don't want to log just "com.acme.*" output, I want<br>
to log everything the root logger is logging.<br>
<br>
Help please!<br>
<br>
Thank you.<br>
<br>
<br>
<configuration><br>
<appender name="FILE" class="ch.qos.logback.core.FileAppender"><br>
<file>../logs/esign-app.log</file><br>
<encoder><br>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %level [%thread]<br>
[%class{0}:%line] %msg%n</pattern><br>
</encoder><br>
</appender><br>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"><br>
<encoder><br>
<pattern>%d{HH:mm:ss.SSS} %level [%thread] [%class{0}:%line]<br>
%msg%n</pattern><br>
</encoder><br>
</appender><br>
<logger name="com.acme" level="debug" additivity="false"><br>
<appender-ref ref="FILE" /><br>
</logger><br>
<br>
<root level="info"><br>
<appender-ref ref="CONSOLE" /><br>
</root><br>
</configuration><br>
<br>
</blockquote></blockquote>
<br>
<br>
<br>
_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
</div></div></blockquote></div><br>