<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Logging APIs &#8211; Feature List</title>
	<atom:link href="http://mcherm.com/permalinks/1/logging-apis-feature-list/feed" rel="self" type="application/rss+xml" />
	<link>http://mcherm.com/permalinks/1/logging-apis-feature-list</link>
	<description>Adventures in Programming</description>
	<lastBuildDate>Fri, 02 Apr 2010 16:07:43 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: David Horvath</title>
		<link>http://mcherm.com/permalinks/1/logging-apis-feature-list/comment-page-1#comment-35408</link>
		<dc:creator>David Horvath</dc:creator>
		<pubDate>Tue, 09 Feb 2010 13:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=388#comment-35408</guid>
		<description>The JVM may prevent #2 but that doesn&#039;t help for O/S faults, or, as you mention, other languages. In the &quot;old C days&quot; the saying was &quot;The world is not a VAX&quot; (because the VAX would let you get away with things that would upset other systems – like dereferencing the NULL pointer). So you have to remember, &quot;The world is not just Java&quot; :-)</description>
		<content:encoded><![CDATA[<p>The JVM may prevent #2 but that doesn&#8217;t help for O/S faults, or, as you mention, other languages. In the &#8220;old C days&#8221; the saying was &#8220;The world is not a VAX&#8221; (because the VAX would let you get away with things that would upset other systems – like dereferencing the NULL pointer). So you have to remember, &#8220;The world is not just Java&#8221; :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mcherm</title>
		<link>http://mcherm.com/permalinks/1/logging-apis-feature-list/comment-page-1#comment-35407</link>
		<dc:creator>mcherm</dc:creator>
		<pubDate>Tue, 09 Feb 2010 13:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=388#comment-35407</guid>
		<description>Oh, I particularly like your #1 &quot;Uniqueness of Message&quot;. A useful feature that I&#039;ve seen is to automatically mark each log message with the line and file from which it was generated. This should be one of the criteria.

 

#2 I&#039;m not so sure about. In the Java world, files flush when they are closed suddenly, unless the JVM itself crashes -- and that is VERY rare these days; it essentially never happens with our files. Of course, this isn&#039;t supposed to be a java-specific list, so given that I should probably list that one too.</description>
		<content:encoded><![CDATA[<p>Oh, I particularly like your #1 &#8220;Uniqueness of Message&#8221;. A useful feature that I&#8217;ve seen is to automatically mark each log message with the line and file from which it was generated. This should be one of the criteria.</p>
<p>#2 I&#8217;m not so sure about. In the Java world, files flush when they are closed suddenly, unless the JVM itself crashes &#8212; and that is VERY rare these days; it essentially never happens with our files. Of course, this isn&#8217;t supposed to be a java-specific list, so given that I should probably list that one too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Horvath</title>
		<link>http://mcherm.com/permalinks/1/logging-apis-feature-list/comment-page-1#comment-35406</link>
		<dc:creator>David Horvath</dc:creator>
		<pubDate>Tue, 09 Feb 2010 13:19:26 +0000</pubDate>
		<guid isPermaLink="false">http://mcherm.com/?p=388#comment-35406</guid>
		<description>Two issues largely missed in logging

Uniqueness of message – &quot;we had an error&quot; that appears in multiple places… Which specific chunk of code with that message was the one that created it?  I&#039;ve seen function name and/or unique error number be most effective. But if you’ve got multiple functions with the same name (object overloading) then it can become complex. And tracking unique error numbers, especially with shared code/object libraries can become complex. 
Message buffering. This one only really matters if the application crashes rather than being able to exit gracefully when an error is detected/handled. I&#039;m a strong proponent of the C fflush(); it could be handled as part of the error logging code/objects (your logger.X example) with a frequency count (every N messages) or semi-explicitly (after a type of invocation), or even manually. 
 

Granted, frequent fflushes slows processing (forcing physical I/O rather than buffered into larger writes), but provides more information on failure.

 

Your last &quot;Delayed String Construction&quot; example reminds me a lot of the C printf statement… Except you used {} instead of %s%s%s%s%s.</description>
		<content:encoded><![CDATA[<p>Two issues largely missed in logging</p>
<p>Uniqueness of message – &#8220;we had an error&#8221; that appears in multiple places… Which specific chunk of code with that message was the one that created it?  I&#8217;ve seen function name and/or unique error number be most effective. But if you’ve got multiple functions with the same name (object overloading) then it can become complex. And tracking unique error numbers, especially with shared code/object libraries can become complex.<br />
Message buffering. This one only really matters if the application crashes rather than being able to exit gracefully when an error is detected/handled. I&#8217;m a strong proponent of the C fflush(); it could be handled as part of the error logging code/objects (your logger.X example) with a frequency count (every N messages) or semi-explicitly (after a type of invocation), or even manually. </p>
<p>Granted, frequent fflushes slows processing (forcing physical I/O rather than buffered into larger writes), but provides more information on failure.</p>
<p>Your last &#8220;Delayed String Construction&#8221; example reminds me a lot of the C printf statement… Except you used {} instead of %s%s%s%s%s.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

