A few days ago Powerflasher released a new version of their logging tool SOS. I have used it in the past but stopped using it because I switched to Mac. Since the new version also runs on OS X I gave the new version a try and it works nicely.
I have posted a little extension for SOS about two years ago and now I made a little update which is easier to use. It works the same way as the TraceTarget I already blogged about.
The project is hosted on Google Code.
In you Flex project simply put this line into you main MXML:
And add the namespace: xmlns:logging=”com.soenkerohde.logging.*”
The rest works like described in my post about TraceTarget.
This version also supports multiline logs which can show up collapsed and can be expanded:

The application code for the example above:
<!--[CDATA[ import mx.logging.Log; import mx.logging.ILogger; private static const logger:ILogger = Log.getLogger("Main"); private function init():void { logger.debug("debug"); logger.info("info"); logger.warn("warn"); logger.error("error"); logger.fatal("fatal"); logger.info("This is a multiline log example\nwith a second line."); } ]]-->








Hi,
Nice utility, thanks. Might be worth mentioning that after you add the namespace declaration you need to add the logger with:
” includeCategory=”true” includeLevel=”true” includeTime=”true”/>
I do have a problem with using this logger and when my app makes a external network access (via HTTPService for example). It seems to lose connection at that point - Any pointer?
Hi Richard,
I don’t know why external call might disconncet SOS.
Do you have a small testcase so I can try it on my own?
Hi,
I dont have a short but but it happens if:
1) Setup basic mxml app with SOSLogger
2) Log something to get the connection running
3) Call HTTP Service (anything external)
4) SOS Max then opens a dialog saying ‘Command Error’ and the text of the box is:
The processing instruction target matching “[xX][mM][lL]” is not allowed.
After some further tests I think it might just be log statements i the Flex Framework. If I filter them out the error doesn’t happen.
Hi Richard,
I updated the SWC. Now “<” in log messages will be replaced with “^” so SOS has no problems with an opening tag. Please try and report if this fixes your problem.
Hi,
That fixes the problem. The XML looks a bit odd:
^tag>somedata^/tag>
but it works. Thanks for the update!
I know. If you have a better idea let me know.
I will release the code later this year when I have a bit more time.
Hey, great work. thanks. Can you also publish the source code? I tried decompiling the SWC, but it didn’t come out so well.
I have my own logging framework that I use in AS3 projects, and I’m not using mx.logging.ILoggingTarget. I repackaged and refactored the mx log classes because they statically linked in a bunch of flex stuff.
Hi Ronzoni,
it’s now on google code: http://code.google.com/p/sosloggingtarget