Thanks Abraham!<div><br></div><div>No shorts cuts:) I was hoping to do a quick working sample.. since logback is claimed to be a simple (yet powerful) extension of log4j.<div>Thanks, I guess no alternative to reading the man pages.</div>
<div><br></div><div>You mentioned one thing below: "you've provided the JDK logging binding / so code uses that instead of the fallback NOP logger":</div><div>- Am assuming NOP is No Operation logger?</div><div>
- Where did I provide the JDK logging bindings - haven't imported any Java Logging packages.</div><div>- While I will read the doc (saw it before, but resisted:) ) - with the given code + logback.xml + jars, if I include logback.jar(s) things should just 'work'... or I will need to update code in some ways to 'make it use the logback'</div>
<div><br></div><div>Thanks,</div><div>Kundan</div><div><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 12:14 AM, Abraham Lin [via Logback] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=12599&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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" rel="nofollow" link="external" target="_blank">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>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="http://user/SendEmail.jtp?type=node&node=12597&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><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>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' style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div>
<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>
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' style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div><div><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' 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" target="_top">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>
<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>
<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>
<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" target="_top">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><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' 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><div>
<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" rel="nofollow" link="external" 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" rel="nofollow" link="external" target="_blank">Users mailing list archive</a> at Nabble.com.<br></div></div><br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="http://user/SendEmail.jtp?type=node&node=12597&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>
<br>_______________________________________________
<br>Logback-user mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=12597&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 noshade size="1" color="#cccccc">
<div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
<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-tp12583p12597.html" target="_blank" rel="nofollow" link="external">http://logback.10977.n7.nabble.com/Simplest-Java-sample-Simplest-logback-xml-what-no-logfile-tp12583p12597.html</a>
</div>
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To unsubscribe from Simplest Java sample; Simplest logback.xml; what no logfile, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
<a 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" style="font:9px serif" target="_blank" link="external">NAML</a>
</div></blockquote></div><br><br clear="all"><div><br></div>-- <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' style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<font size="1" face="trebuchet ms,sans-serif">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 style="font-family:"trebuchet ms",sans-serif" size="1">- <strong>Ben Franklin</strong></font></font></div>
<div><font size="1"><font face="trebuchet ms,sans-serif"></font><br></font></div>
</div></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-tp12583p12599.html">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">Users mailing list archive</a> at Nabble.com.<br/>