2010-06-28 132 views
0

我正在檢查「Flex控制檯」 - >here,看起來非常有趣。 它似乎易於使用和輕集成。但是如何?我一直在四處尋找一些有關它的信息,但沒有成功。我發現this後,但我不明白它是如何使用的... 如果任何人有任何想法如何使用它或有任何其他應用程序會做同樣的建議(保存與過濾器和東西清除靈活日誌)我會很感激。Flex控制檯 - 如何使用它?

問候, BS_C3

回答

0

Flex的控制檯已經移動到新的位置:http://code.google.com/p/flex-console/

簡單地說,你在你的項目中創建一個MiniDebugTarget並開始使用日誌記錄API記錄。

import mx.logging.*; 
import mx.logging.targets.*; 

public class MyApp { 

    static private logger:ILogger = Log.getLogger("sample.MyApp"); 

    public function MyApp() { 
     super(); 
     // Add the MinuDebugTarget to channel 
     // all log messages to LocalConnection 
     // You only need to do this once! 
     var target:MiniDebugTarget = new MiniDebugTarget(); 
     target.filters = ["*"]; 
     target.includeDate = true; 
     target.includeTime = true; 
     target.includeCategory = true; 
     target.includeLevel = true; 
     Log.addTarget(target); 
    } 

    public function foo(bar:String):void { 
     logger.debug("foo({0})", bar); 
     try { 
      // do something 
      .. 
     } catch(e:Error) { 
      logger.error("Error: ", e.message); 
      throw e; 
     } 
    } 
} 

查看新網站上的幫助頁面。

+0

我會檢查一下。謝謝!! – 2010-07-25 20:07:43