Put <font face="'courier new', monospace">logback.xml</font> into the root of your src directory (not in a subdir). This worked fine for me (see attached Netbeans project).<div><br></div><div>The output you were seeing was from the <font face="'courier new', monospace"><a href="http://logback.qos.ch/apidocs/ch/qos/logback/classic/BasicConfigurator.html">BasicConfigurator</a> </font>(loaded by default when <font face="'courier new', monospace">logback.xml</font> is not found in your classpath), which uses the <font face="'courier new', monospace">ConsoleAppender</font>. It just so happens that your <font face="'courier new', monospace">logback.xml </font>also uses the same type of appender, which might have confused you into thinking that Logback was ignoring the specified pattern in your configuration.</div>

<div><br></div><div><br><div class="gmail_quote">On Fri, Jan 20, 2012 at 12:07 PM, Roger Spears <span dir="ltr"><<a href="mailto:rspears@northweststate.edu">rspears@northweststate.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div text="#000000" bgcolor="#FFFFFF">
Hello,<br>
  <br>
I'm running Netbeans 7.0.1 on a Mac Book Pro with OS Lion.  I'm 
currently using log4j without any problems.  I wanted to try out 
logback.<br>
  <br>
Yesterday I downloaded logback and placed the 4 jar files in the proper 
location.  I'm able to run the basic logback HelloWorld example.<span>  
Here's the code for the HelloWorld example I'm working with:<br>
<br>
package helloworld;<br>
<br>
import org.slf4j.Logger;<br>
import org.slf4j.LoggerFactory;<br>
<br>
public class HelloWorld {<br>
<br>
  public static void main(String[] args) {<br>
<br>
    Logger logger = LoggerFactory.getLogger("helloworld");<br>
    logger.debug("Hello world.");<br>
<br>
  }<br>
  <br>
} </span><br>
  <br>
Here's my customized logback.xml file:<br>
  <br>
  <span><configuration><br>
  <appender name="STDOUT" 
class="ch.qos.logback.core.ConsoleAppender"><br>
    <encoder><br>
      <pattern>%date %n [%thread] %level %logger{35} - %n 
%msg</pattern><br>
    </encoder><br>
  </appender><br>
  <root level="DEBUG"><br>
    <appender-ref ref="STDOUT" /><br>
  </root><br>
</configuration> </span><br>
  <br>
The problem is...Netbeans (or java) never picks up on my customized 
logback.xml file.  I'm starting out easy by just changing the pattern to
 see if I can get it to work.  When I run the project, I see the 
following on the console:<br>
  <br>
11:56:33.569 [main] DEBUG helloworld - Hello world.<br>
  <br>
That's not the pattern I specified in logback.xml.<br>
  <br>
I'm assuming I just don't have it in the proper location.  I have a copy
 of logback.xml in the following locations just to see if I had it in 
the wrong place:<br>
  <br>
NetBeansProjects -> HelloWorld -> src -> logback.xml<br>
  <br>
  <span>NetBeansProjects -> HelloWorld -> logback.xml </span><br>
  <br>
  <span>NetBeansProjects -> HelloWorld -> nbproject -> private 
-> logback.xml </span><br>
  <br>
  <span>NetBeansProjects -> HelloWorld -> build -> classes 
-> logback.xml </span><br>
  <br>
System -> Libraries -> Java -> Extensions -> logback.xml<br>
  <br>
  <br>
I am still unable to get the pattern I'm looking for.<br>
  <br>
Does anyone know why this would be happening?<br>
  <br>
Thanks,<br>
Roger<span class="HOEnZb"><font color="#888888"><br>
  <div>-- <br>Roger<span><span><span style="font-size:11.0pt;font-family:"Times New Roman""><u></u><u></u></span></span></span><span>

</span></div>
</font></span></div>
<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>