blob: 105976ee279dc412dcf73d21b77ed4d44ca49d6b [file] [log] [blame]
{ "type": "class",
"qname": "mx.logging.Log",
"baseClassname": ""
,
"description": "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. <p> 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 &quot;mx.messaging&quot; and &quot;mx.rpc&quot; packages and want the output from these packages to be formatted as XML. To get the all of the logging information under the &quot;mx.messaging&quot; category including sub-packages and components a wildcard expression is required, such as &quot;mx.messaging.~~&quot;. See the code example below for more details. </p> <p>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: <code>MiniDebugTarget</code> and <code>TraceTarget</code>. Each of these writers take the current log information and &quot;sends&quot; it somewhere for display and/or storage. Targets also provide the specification of what log data to output. </p> <pre>\\n ...\\n import mx.logging.targets.*;\\n import mx.logging.*;\\n \\n private function initLogging():void {\\n // Create a target.\\n var logTarget:TraceTarget = new TraceTarget();\\n \\n // Log only messages for the classes in the mx.rpc.* and\\n // mx.messaging packages.\\n logTarget.filters=[&quot;mx.rpc.*&quot;,&quot;mx.messaging.*&quot;];\\n \\n // Log all log levels.\\n logTarget.level = LogEventLevel.ALL;\\n \\n // Add date, time, category, and log level to the output.\\n logTarget.includeDate = true;\\n logTarget.includeTime = true;\\n logTarget.includeCategory = true;\\n logTarget.includeLevel = true;\\n \\n // Begin logging.\\n Log.addTarget(logTarget);\\n }\\n ...\\n </pre>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "example",
"values": []},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "isFatal",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Indicates whether a fatal level log event will be processed by a log target.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["true if a fatal level log event will be logged; otherwise false."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": []}
,
{ "type": "method",
"qname": "isError",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Indicates whether an error level log event will be processed by a log target.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["true if an error level log event will be logged; otherwise false."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": []}
,
{ "type": "method",
"qname": "isWarn",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Indicates whether a warn level log event will be processed by a log target.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["true if a warn level log event will be logged; otherwise false."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": []}
,
{ "type": "method",
"qname": "isInfo",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Indicates whether an info level log event will be processed by a log target.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["true if an info level log event will be logged; otherwise false."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": []}
,
{ "type": "method",
"qname": "isDebug",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Indicates whether a debug level log event will be processed by a log target.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["true if a debug level log event will be logged; otherwise false."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": []}
,
{ "type": "method",
"qname": "addTarget",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Allows the specified target to begin receiving notification of log events.",
"tags": [
{ "tagName": "param",
"values": ["The specific target that should capture log events."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "target", "type": "mx.logging.ILoggingTarget"}]}
,
{ "type": "method",
"qname": "removeTarget",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Stops the specified target from receiving notification of log events.",
"tags": [
{ "tagName": "param",
"values": ["The specific target that should capture log events."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "target", "type": "mx.logging.ILoggingTarget"}]}
,
{ "type": "method",
"qname": "getLogger",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "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: []~$^&amp;\\/(){}&lt;&gt;+=`!#%?,:;'&quot;&#64; This method will throw an <code>InvalidCategoryError</code> if the category specified is malformed. If the name doesn't exist, a new instance with the specified name is returned.",
"tags": [
{ "tagName": "param",
"values": ["category The category of the logger that should be returned."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["An instance of a logger object for the specified name."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "mx.logging.ILogger",
"params": [{ "name": "category", "type": "String"}]}
,
{ "type": "method",
"qname": "flush",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "This method removes all of the current loggers from the cache. Subsquent calls to the <code>getLogger()</code> method return new instances of loggers rather than any previous instances with the same category. This method is intended for use in debugging only.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "hasIllegalCharacters",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "This method checks the specified string value for illegal characters. The following characters are not valid: []~$^&amp;\\/(){}&lt;&gt;+=`!#%?,:;'&quot;&#64; <code>false</code> otherwise",
"tags": [
{ "tagName": "param",
"values": ["value The String to check for illegal characters."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["<code>true</code> if there are any illegal characters found,"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "value", "type": "String"}]}
]
}