kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkr...@apache.org
Subject svn commit: r1158350 - /incubator/kafka/site/coding-guide.html
Date Tue, 16 Aug 2011 16:14:30 GMT
Author: jkreps
Date: Tue Aug 16 16:14:30 2011
New Revision: 1158350

URL: http://svn.apache.org/viewvc?rev=1158350&view=rev
Log:
Misc. fixes suggested by cburroughs.


Modified:
    incubator/kafka/site/coding-guide.html

Modified: incubator/kafka/site/coding-guide.html
URL: http://svn.apache.org/viewvc/incubator/kafka/site/coding-guide.html?rev=1158350&r1=1158349&r2=1158350&view=diff
==============================================================================
--- incubator/kafka/site/coding-guide.html (original)
+++ incubator/kafka/site/coding-guide.html Tue Aug 16 16:14:30 2011
@@ -19,6 +19,7 @@ These guidelines are meant to encourage 
 </ul>
 
 <h2>Scala</h2>
+We are following the style guide given <a href="http://davetron5000.github.com/scala-style/ScalaStyleGuide.pdf
">here</a> (though not perfectly). Below are some specifics worth noting:
 <ul>
 <li>Scala is a very flexible language. Use restraint. Magic cryptic one-liners do not
impress us, readability impresses us.</li>
 <li>Use <code>val</code>s when possible.</li>
@@ -39,7 +40,7 @@ These guidelines are meant to encourage 
 <li>Logging is one third of our "UI" and it should be taken seriously. Please take
the time to assess the logs when making a change to ensure that the important things are getting
logged and there is no junk there.</li>
 <li>Logging statements should be complete sentences with proper capitalization that
are written to be read by a person not necessarily familiar with the source code. It is fine
to put in hacky little logging statements when debugging, but either clean them up or remove
them before checking in. So logging something like "INFO: entering SyncProducer send()" is
not appropriate.</li>
 <li>Logging should not mention class names or internal variables.</li>
-<li>There are four levels of logging <code>TRACE</code>, <code>DEBUG</code>,
<code>INFO</code>, <code>WARN</code>, <code>ERROR</code>,
and <code>FATAL</code>, they should be used as follows.
+<li>There are six levels of logging <code>TRACE</code>, <code>DEBUG</code>,
<code>INFO</code>, <code>WARN</code>, <code>ERROR</code>,
and <code>FATAL</code>, they should be used as follows.
 	<ul>
     <li><code>INFO</code> is the level you should assume the software will
be run in. INFO messages are things which are not bad but which the user will definitely want
to know about every time they occur.
     <li><code>TRACE</code> and <code>DEBUG</code> are both
things you turn on when something is wrong and you want to figure out what is going on. <code>DEBUG</code>
should not be so fine grained that it will seriously effect the performance of the server.
<code>TRACE</code> can be anything. Both <code>DEBUG</code> and <code>TRACE</code>
statements should be wrapped in an <code>if(logger.isDebugEnabled)</code> check
to avoid pasting together big strings all the time.



Mime
View raw message