<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head><body
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<br>
<div class="moz-signature">-- <br>Roger<span
style="mso-bookmark:OLE_LINK1"><span style="mso-bookmark:OLE_LINK2"><span
style="font-size:11.0pt;font-family:"Times New Roman""><o:p></o:p></span></span></span><span>
</span></div>
</body>
</html>