<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">I also tried adding the
class to the encoder. That didn't work either.<br>
<br>
Something else that's weird. I imported Tony's project to my Netbeans
and it stated it had reference issues. It could not find
logback-core-1.0.0.jar, logback-classic-1.0.0.jar and
sl4j-api-1.6.4.jar. I know I can resolve this, I'll just point them
towards my versions of those jar's. BUT, for giggles, I ran the project
with the unresolved reference issues and it displayed the same thing on
the console:<br>
<br>
19:57:35.609 [main] INFO helloworld.HelloWorld - hello world!<br>
<br>
I'm not sure if that's a clue to anything or if that's the expected
behavior since I have those files in my classpath.<br>
<br>
Thanks,<br>
Roger<br>
<br>
<blockquote style="border: 0px none;"
cite="mid:-3829111931264972266@unknownmsgid" type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="adam.n.gordon@gmail.com" photoname="Adam Gordon"
src="cid:part1.04080903.05000305@northweststate.edu"
name="postbox-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:adam.n.gordon@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Adam Gordon</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">January 20, 2012
7:44 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>based on Tony's earlier
response, it sounds like log back still cannot find<br>your XML file on
the class path.<br><br>--adam<br><br>On Jan 20, 2012, at 17:41, Roger
Spears <a class="moz-txt-link-rfc2396E" href="mailto:rspears@northweststate.edu"><rspears@northweststate.edu></a> wrote:<br><br> I'm curious,
when you run the attached project, what do you get for the<br>console
output? Since it has FOOBAR in the pattern, I would have expected<br>to
see FOOBAR on the console. Instead, I still see the default display:<br><br>19:34:45.088
[main] INFO helloworld.HelloWorld - hello world!<br><br>Is that what
you get when you the project that you attached?<br><br>Thanks,<br>Roger<br><br>
<compose-unknown-contact.jpg><br> Tony Trinh
<a class="moz-txt-link-rfc2396E" href="mailto:tony19@gmail.com"><tony19@gmail.com></a><br> January 20, 2012 1:34 PM<br>Put logback.xml
into the root of your src directory (not in a subdir). This<br>worked
fine for me (see attached Netbeans project).<br><br>The output you were
seeing was from the<br>BasicConfigurator<br><a class="moz-txt-link-rfc2396E" href="http://logback.qos.ch/apidocs/ch/qos/logback/classic/BasicConfigurator.html"><http://logback.qos.ch/apidocs/ch/qos/logback/classic/BasicConfigurator.html></a><a class="moz-txt-link-rfc2396E" href="http://logback.qos.ch/apidocs/ch/qos/logback/classic/BasicConfigurator.html"><http://logback.qos.ch/apidocs/ch/qos/logback/classic/BasicConfigurator.html></a><br>(loaded<br>by
default when logback.xml is not found in your classpath), which uses
the<br>ConsoleAppender. It just so happens that your logback.xml also
uses the<br>same type of appender, which might have confused you into
thinking that<br>Logback was ignoring the specified pattern in your
configuration.<br><br><br>On Fri, Jan 20, 2012 at 12:07 PM, Roger Spears<br><br>_______________________________________________<br>Logback-user
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br><a class="moz-txt-link-freetext" href="http://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br>
<compose-unknown-contact.jpg><br> Roger Spears
<a class="moz-txt-link-rfc2396E" href="mailto:rspears@northweststate.edu"><rspears@northweststate.edu></a><br> January 20, 2012 12:07 PM<br>Hello,<br><br>I'm
running Netbeans 7.0.1 on a Mac Book Pro with OS Lion. I'm currently<br>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<br>location.
I'm able to run the basic logback HelloWorld example. Here's<br>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>}<br><br>Here's my customized logback.xml
file:<br><br><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><br><br>The
problem is...Netbeans (or java) never picks up on my customized<br>logback.xml
file. I'm starting out easy by just changing the pattern to<br>see if I
can get it to work. When I run the project, I see the following<br>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<br>logback.xml
in the following locations just to see if I had it in the wrong<br>place:<br><br>NetBeansProjects
-> HelloWorld -> src -> logback.xml<br><br>NetBeansProjects
-> HelloWorld -> logback.xml<br><br>NetBeansProjects ->
HelloWorld -> nbproject -> private -> logback.xml<br><br>NetBeansProjects
-> HelloWorld -> build -> classes -> logback.xml<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><br><br></div><div>_______________________________________________<br>Logback-user
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br><a class="moz-txt-link-freetext" href="http://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="tony19@gmail.com" photoname="Tony Trinh"
src="cid:part2.01040705.01040800@northweststate.edu"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:tony19@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Tony Trinh</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">January 20, 2012
1:34 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>Put logback.xml into the
root of your src directory (not in a subdir). This<br>worked fine for me
(see attached Netbeans project).<br><br>The output you were seeing was
from the<br>BasicConfigurator<a class="moz-txt-link-rfc2396E" href="http://logback.qos.ch/apidocs/ch/qos/logback/classic/BasicConfigurator.html"><http://logback.qos.ch/apidocs/ch/qos/logback/classic/BasicConfigurator.html></a><br>(loaded<br>by
default when logback.xml is not found in your classpath), which uses
the<br>ConsoleAppender. It just so happens that your logback.xml also
uses the<br>same type of appender, which might have confused you into
thinking that<br>Logback was ignoring the specified pattern in your
configuration.<br><br><br>On Fri, Jan 20, 2012 at 12:07 PM, Roger Spears<br></div><div><!----><br></div><div>_______________________________________________<br>Logback-user
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br><a class="moz-txt-link-freetext" href="http://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="rspears@northweststate.edu" photoname="Roger Spears"
src="cid:part2.01040705.01040800@northweststate.edu"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:rspears@northweststate.edu"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Roger Spears</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">January 20, 2012
12:07 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">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. 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>}
<br>
<br>Here's my customized logback.xml file:
<br>
<br><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>
<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>NetBeansProjects -> HelloWorld -> logback.xml
<br>
<br>NetBeansProjects -> HelloWorld -> nbproject -> private
-> logback.xml
<br>
<br>NetBeansProjects -> HelloWorld -> build -> classes ->
logback.xml
<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>
</blockquote>
<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></body></html>