適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: 從伺服器擷取資料...
從伺服器擷取資料...
mx.logging 

Log  - AS3 Flex

套件mx.logging
類別public class Log
繼承Log Inheritance Object

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Provides pseudo-hierarchical logging capabilities with multiple format and output options. The log system consists of two major components, the logger and a target. You can use the logger to send information to a target. The target is responsible for formatting and general output of the log data.

Loggers are singleton instances created for a particular category of information. Typically, the category is the package name of the component that desires to log information. The category provides users the ability to specify what log information they are interested in. Multiple categories can be selected and combined with regular expressions. This allows for both broad and narrow logging information to be acquired. For example, you might be interested in all logging information under the "mx.messaging" and "mx.rpc" packages and want the output from these packages to be formatted as XML. To get the all of the logging information under the "mx.messaging" category including sub-packages and components a wildcard expression is required, such as "mx.messaging.*". See the code example below for more details.

Targets provide the output mechanism of the data being logged. This mechanism typically includes formatting, transmission, or storage, but can be anything possible under the VM. There are two targets provided: MiniDebugTarget and TraceTarget. Each of these writers take the current log information and "sends" it somewhere for display and/or storage. Targets also provide the specification of what log data to output.

更多範例



公用屬性
 屬性定義自
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
公用方法
 方法定義自
  
[靜態] Allows the specified target to begin receiving notification of log events.
Log
  
[靜態] This method removes all of the current loggers from the cache.
Log
  
[靜態] Returns the logger associated with the specified category.
Log
  
[靜態] This method checks the specified string value for illegal characters.
Log
 Inherited
指出物件是否有已定義的指定屬性。
Object
  
[靜態] Indicates whether a debug level log event will be processed by a log target.
Log
  
[靜態] Indicates whether an error level log event will be processed by a log target.
Log
  
[靜態] Indicates whether a fatal level log event will be processed by a log target.
Log
  
[靜態] Indicates whether an info level log event will be processed by a log target.
Log
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
  
[靜態] Indicates whether a warn level log event will be processed by a log target.
Log
 Inherited
指出指定的屬性是否存在,以及是否可列舉。
Object
  
[靜態] Stops the specified target from receiving notification of log events.
Log
 Inherited
為迴圈作業設定動態屬性的可用性。
Object
 Inherited
傳回代表此物件的字串,根據地區特定慣例進行格式化。
Object
 Inherited
會傳回指定之物件的字串形式。
Object
 Inherited
會傳回指定之物件的基本值。
Object
方法詳細資訊

addTarget

()方法
public static function addTarget(target:mx.logging:ILoggingTarget):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Allows the specified target to begin receiving notification of log events.

參數

target:mx.logging:ILoggingTarget — specific target that should capture log events.

flush

()方法 
public static function flush():void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

This method removes all of the current loggers from the cache. Subsquent calls to the getLogger() method return new instances of loggers rather than any previous instances with the same category. This method is intended for use in debugging only.

getLogger

()方法 
public static function getLogger(category:String):ILogger

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the logger associated with the specified category. If the category given doesn't exist a new instance of a logger will be returned and associated with that category. Categories must be at least one character in length and may not contain any blanks or any of the following characters: []~$^&\/(){}<>+=`!#%?,:;'"@ This method will throw an InvalidCategoryError if the category specified is malformed.

參數

category:String — The category of the logger that should be returned.

傳回值
ILogger — An instance of a logger object for the specified name. If the name doesn't exist, a new instance with the specified name is returned.

hasIllegalCharacters

()方法 
public static function hasIllegalCharacters(value:String):Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

This method checks the specified string value for illegal characters.

參數

value:String — The String to check for illegal characters. The following characters are not valid: []~$^&\/(){}<>+=`!#%?,:;'"@

傳回值
Booleantrue if there are any illegal characters found, false otherwise

isDebug

()方法 
public static function isDebug():Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Indicates whether a debug level log event will be processed by a log target.

傳回值
Boolean — true if a debug level log event will be logged; otherwise false.

isError

()方法 
public static function isError():Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Indicates whether an error level log event will be processed by a log target.

傳回值
Boolean — true if an error level log event will be logged; otherwise false.

isFatal

()方法 
public static function isFatal():Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Indicates whether a fatal level log event will be processed by a log target.

傳回值
Boolean — true if a fatal level log event will be logged; otherwise false.

isInfo

()方法 
public static function isInfo():Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Indicates whether an info level log event will be processed by a log target.

傳回值
Boolean — true if an info level log event will be logged; otherwise false.

isWarn

()方法 
public static function isWarn():Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Indicates whether a warn level log event will be processed by a log target.

傳回值
Boolean — true if a warn level log event will be logged; otherwise false.

removeTarget

()方法 
public static function removeTarget(target:mx.logging:ILoggingTarget):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Stops the specified target from receiving notification of log events.

參數

target:mx.logging:ILoggingTarget — specific target that should capture log events.





[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。