<div dir="ltr">The SLF4J library is just an API that expects an implementation (not necessarily logback) to be bound at runtime. See the documentation: <a href="http://www.slf4j.org/manual.html">http://www.slf4j.org/manual.html</a>. It also looks like you've provided the JDK logging binding, so your code is using that instead of the fallback NOP logger.<div>
<br></div><div style>Your program has no dependencies on logback APIs, so there's no reason why it wouldn't work.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 26, 2013 at 11:49 PM, Kundan Bapat <span dir="ltr"><<a href="mailto:kundan.bapat@gmail.com" target="_blank">kundan.bapat@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>hmm... I though the slf4j code is a wrapper around logback?</div><div>And if I do not have the logback jar files how did the program still run?</div>
<div>does it mean that some of the slf4j code look for logback classes, and if not found, degrades gracefully by 'not bothering to look for logback.xml, and just do the console logging?</div>
<div> </div><div>Thank you</div><div>Kundan.<br><br></div><div class="gmail_quote"><div class="im">On Wed, Jun 26, 2013 at 9:16 PM, Abraham Lin [via Logback] <span dir="ltr"><<a href="http://user/SendEmail.jtp?type=node&node=12595&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span> wrote:<br>
</div><blockquote style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div class="im">
<div dir="ltr">Unless your original e-mail omitted some information, it doesn't look like you have the logback JARs on your classpath.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">
On Wed, Jun 26, 2013 at 3:17 AM, Kundan Bapat <span dir="ltr"><<a href="http://user/SendEmail.jtp?type=node&node=12593&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span> wrote:<br>
</div></div><blockquote style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div><div class="h5"><div>Ajay,</div><div><br></div><div>Rhanks dir a quick response.</div><div><br></div>
<div>I started on eclipse; but as I started to strip down the complexity, I moved to command line, removed ANT, other files etc. the result - running the program on the cmd window, and console output of the messages which I have included in the single java file (attached-3messages).</div>
<div><span>Nothing else, no errors, and no message regarding 'file log back.xml not found', or invalid syntax, or exception trace ... nothing. Plain successful execution of program with console logging as if logback.xml doesn't exist!</span><br>
</div><div><br></div><div>Thanks</div><div>Kundan</div><div><div><br><br></div><div><br>On Jun 26, 2013, at 2:53 AM, "Ajaykumar Ashokkumar Lavhade [via Logback]"<<a href="http://user/SendEmail.jtp?type=node&node=12587&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:<br>
<br></div><div></div></div><blockquote style="border-left:2px solid #cccccc;padding:0 1em" type="cite"><div><div>
Hi Kundan,
<br><br>As per your logback.xml settings logFile.log will get created in your project directory. If you are using eclipse and you are not able to view your logFile.log in your project directory then please do refresh it.
<br>If this doesn't work then post the entire message you gets on console.
<br><br>Thanks,
<br>Ajay
<br><br>-----Original Message-----
<br></div><div>From: Logback-user [mailto:<a href="http://user/SendEmail.jtp?type=node&node=12586&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>] On Behalf Of Kundan Bapat
<br>Sent: Wednesday, June 26, 2013 11:37 AM
<br></div><div>To: <a href="http://user/SendEmail.jtp?type=node&node=12586&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>Subject: Re: [logback-user] Simplest Java sample; Simplest logback.xml; what no logfile
<br><br>Just noticed some syntax errors in logback.xml, as I was meddling with it, trying different things.
<br><br>But as mentioned in previous post, it doesn't matter because the logback.xml file is simply 'not read in' when the Java class is executed.
<br>Thanks
<br>Kundan
<br><br><br><br>--
<br>View this message in context: <a href="http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12584.html" rel="nofollow" link="external" target="_blank">http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12584.html</a><br>
Sent from the Users mailing list archive at <a href="http://Nabble.com" rel="nofollow" link="external" target="_blank">Nabble.com</a>.
<br>_______________________________________________
<br>Logback-user mailing list
<br></div><a href="http://user/SendEmail.jtp?type=node&node=12586&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div><a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="nofollow" link="external" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br><br>**************** CAUTION - Disclaimer *****************
<br>This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
<br>for the use of the addressee(s). If you are not the intended recipient, please
<br>notify the sender by e-mail and delete the original message. Further, you are not
<br>to copy, disclose, or distribute this e-mail or its contents to any other person and
<br>any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
<br>every reasonable precaution to minimize this risk, but is not liable for any damage
<br>you may sustain as a result of any virus in this e-mail. You should carry out your
<br>own virus checks before opening the e-mail or attachment. Infosys reserves the
<br>right to monitor and review the content of all messages sent to or from this e-mail
<br>address. Messages sent to or from this e-mail address may be stored on the
<br>Infosys e-mail system.
<br>***INFOSYS******** End of Disclaimer ********INFOSYS***
<br>_______________________________________________
<br>Logback-user mailing list
<br></div><a href="http://user/SendEmail.jtp?type=node&node=12586&i=3" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="nofollow" link="external" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br>
<br>
<br>
<hr size="1" color="#cccccc" noshade>
<div style="font:12px/normal tahoma,geneva,helvetica,arial,sans-serif;color:rgb(68,68,68);font-size-adjust:none;font-stretch:normal">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
<a href="http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12586.html" rel="nofollow" link="external" target="_blank">http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12586.html</a>
</div>
<div style="font:11px/1.5em tahoma,geneva,helvetica,arial,sans-serif;color:rgb(102,102,102);margin-top:0.4em;font-size-adjust:none;font-stretch:normal">
To unsubscribe from Simplest Java sample; Simplest logback.xml; what no logfile, <a rel="nofollow" link="external">click here</a>.<br>
<a style="font:9px/normal serif;font-size-adjust:none;font-stretch:normal" href="http://logback.10977.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" link="external" target="_blank">NAML</a>
</div></div></blockquote>
<br><hr width="300" align="left">
View this message in context: <a href="http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12587.html" rel="nofollow" link="external" target="_blank">Re: Simplest Java sample; Simplest logback.xml; what no logfile</a><div>
<div><br>
Sent from the <a href="http://logback.10977.n7.nabble.com/Users-f3.html" rel="nofollow" link="external" target="_blank">Users mailing list archive</a> at Nabble.com.<br></div></div><br>_______________________________________________<br>
Logback-user mailing list<br>
</div></div><a href="http://user/SendEmail.jtp?type=node&node=12593&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="nofollow" link="external" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div><div class="im">
<br>_______________________________________________
<br>Logback-user mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=12593&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="nofollow" link="external" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a>
<br>
<br>
<hr size="1" color="#cccccc" noshade>
</div><div style="font:12px/normal tahoma,geneva,helvetica,arial,sans-serif;color:rgb(68,68,68);font-size-adjust:none;font-stretch:normal"><div class="im">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
</div><a href="http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12593.html" rel="nofollow" link="external" target="_blank">http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12593.html</a>
</div><div class="im">
<div style="font:11px/1.5em tahoma,geneva,helvetica,arial,sans-serif;color:rgb(102,102,102);margin-top:0.4em;font-size-adjust:none;font-stretch:normal">
To unsubscribe from Simplest Java sample; Simplest logback.xml; what no logfile, <a rel="nofollow" link="external">click here</a>.<br>
<a style="font:9px/normal serif;font-size-adjust:none;font-stretch:normal" href="http://logback.10977.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" link="external" target="_blank">NAML</a>
</div></div></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div>Sincerely,</div><div>Kundan </div><div><br></div><div><br></div>
<div><font color="#000099"><span style="font-family:"trebuchet ms",sans-serif"><blockquote style="border-left:2px solid #cccccc;padding:0 1em">
<font face="trebuchet ms,sans-serif" size="1">There never was a truly great man who was not at the same time truly virtuous.<br>Humility | Sincerity | Temperance | Resolution | Industry | Justice</font></blockquote></span><font size="1" style="font-family:"trebuchet ms",sans-serif">- <strong>Ben Franklin</strong></font></font></div>
</font></span><div class="HOEnZb"><div class="h5">
<div><font size="1"><font face="trebuchet ms,sans-serif"></font><br></font></div>
<br><hr align="left" width="300">
View this message in context: <a href="http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12595.html" target="_blank">Re: Simplest Java sample; Simplest logback.xml; what no logfile</a><br>
Sent from the <a href="http://logback.10977.n7.nabble.com/Users-f3.html" target="_blank">Users mailing list archive</a> at Nabble.com.<br></div></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>