Add trace target to logger
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="initializeHandler( )"> <mx:Script> import mx.logging.Log; import mx.logging.targets.TraceTarget; private var _target:TraceTarget; private function initializeHandler( ):void { _target = new TraceTarget( ); _target.includeTime = true; _target.includeLevel = true; _target.includeCategory = true; Log.addTarget(_target); } private function sendToLog( ):void { Log.getLogger("MainClass").info("Log Message"); } </mx:Script> <mx:Button click="sendToLog( )" label="Log Message"/> </mx:Application>