<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nikita Dudnik &#187; logging</title>
	<atom:link href="http://nikitadudnik.com/blog/tag/logging/feed/" rel="self" type="application/rss+xml" />
	<link>http://nikitadudnik.com/blog</link>
	<description>Random casual.</description>
	<lastBuildDate>Thu, 02 Jul 2009 15:40:59 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Logging with SOS max and FlashDevelop 3.</title>
		<link>http://nikitadudnik.com/blog/2009/01/logging-with-sos-max-flashdevelop-3-and-flex-sdk-3/</link>
		<comments>http://nikitadudnik.com/blog/2009/01/logging-with-sos-max-flashdevelop-3-and-flex-sdk-3/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 03:38:40 +0000</pubDate>
		<dc:creator>Nikita</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[sos max]]></category>

		<guid isPermaLink="false">http://nikitadudnik.com/blog/?p=55</guid>
		<description><![CDATA[SOS max is one of the best log output viewers around. It works with anything able to send XML through socket connection. Using special markup you can send different type log messages and define new one. SOS max shows them in colors of your choice and allows to log only specific type of messages depending [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sos.powerflasher.de/">SOS max</a> is one of the best log output viewers around. It works with anything able to send XML through socket connection. Using special markup you can send different type log messages and define new one. SOS max shows them in colors of your choice and allows to log only specific type of messages depending on settings  (i.e. trace, info, warning, error, fatal).  It's not really practical to write correct XML messages by hand. Thanks to Sönke Rodhe <a href="http://soenkerohde.com/2008/08/sos-logging-target/">there is a good solution for Flex</a> to minimize the chance of getting<span class="col_header"> carpal tunnel syndrome</span> due to extra typing hours. But it  doesn't work out of the box with pure Actionscript 3.0.</p>
<p>Here are 4 simple steps to get you going with SOS and Flash Develop 3.</p>
<p>1. <a href="http://solutions.powerflasher.com/products/sosmax/download/">Download SOS MAX</a>.</p>
<p>2. <a href="http://sosloggingtarget.googlecode.com/files/sosloggingtarget.swc">Download sosloggingtarget.swc</a></p>
<p>3. Add <strong>sosloggingtarget.swc</strong> to your project library paths. Don't forget to right click <strong>sosloggingtarget.swc</strong> and "Add to Library".</p>
<p>4. Code example. Read the comments.</p>
<pre class="brush: as3; wrap-lines: true;">package
{
	import flash.events.Event;
	import mx.logging.Log; // Needed
	import mx.logging.ILogger; // Needed
	import com.soenkerohde.logging.SOSLoggingTarget; // Needed

	import flash.display.MovieClip;

	public class App extends MovieClip
	{
		private static const logger:ILogger = Log.getLogger(&quot;App&quot;);
                //Needed. &quot;App&quot; is so called category name.
                //You can include it into log messages.
                //Use it to see what part of your code log text is coming from.
		public function App()
		{
			super();
			var logging_target:SOSLoggingTarget = new SOSLoggingTarget();
                        // Create new logging target - used to configure logger
			// Next four values are false by default.
                        // That's not useful. Let's change 'em.
			logging_target.includeCategory = true;
                        // Include category name in log.
			logging_target.includeDate = true;
                        // Include date.
			logging_target.includeLevel = true;
                        // Use message types. In case of false all the messages will be treated as &quot;info&quot;.
			logging_target.includeTime = true;
                        // Include time in log.
			Log.addTarget(logging_target);
                        // Setup configuration.

			logger.debug(&quot;debug&quot;); // Example of debug message
			logger.info(&quot;info&quot;); // Example of info message
			logger.warn(&quot;warn&quot;); // Example of warn message
			logger.error(&quot;error&quot;); // Example of error message
			logger.fatal(&quot;fatal&quot;); // Example of fatal message

			logger.info(&quot;This is a multi-line log examplenwith a second line.&quot;);
                        // Example of multi-line foldable message

		}

	}

}</pre>
<p style="text-align: left;">Here goes the output:</p>
<p style="text-align: left;"><img class="size-full wp-image-83 alignnone" title="soslog" src="http://nikitadudnik.com/blog/wp-content/uploads/2009/01/soslog.png" alt="soslog" width="401" height="254" /></p>
<p style="text-align: left;">Nice logging!</p>
]]></content:encoded>
			<wfw:commentRss>http://nikitadudnik.com/blog/2009/01/logging-with-sos-max-flashdevelop-3-and-flex-sdk-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
