Constructor for the Log class

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

myWebSrvcLog = new Log([logLevel] [, logName]);

Parameters

logLevel A level to indicate the category of information that you want to record in the log. Four log levels are available:

logName Optional name that is included with each log message. If you are using multiple Log objects, you can use the log name to determine which log recorded a given message.

Returns

Nothing.

Description

Constructor; creates a Log object. After you create the Log object, you can pass it to a web service to get messages.

Example

You can call the new Log constructor to return a Log object to pass to your web service:

// Creates a new log object.
import mx.services.*;
myWebSrvcLog = new Log();
myWebSrvcLog.onLog = function(msg : String) : Void
{
    myTrace(txt)
}

You then pass this Log object as a parameter to the WebService constructor:

myWebSrvc = new WebService("http://www.myco.com/info.wsdl", myWebSrvcLog);

As the web services code executes and messages are sent to the Log object, the onLog() function of your Log object is called. This is the only place to put code that displays the log messages if you want to see them in real time.

The following are examples of log messages:

7/30 15:22:43 [INFO] SOAP: Decoding PendingCall response
7/30 15:22:43 [DEBUG] SOAP: Decoding SOAP response envelope
7/30 15:22:43 [DEBUG] SOAP: Decoding SOAP response body
7/30 15:22:44 [INFO] SOAP: Decoded SOAP response into result [16 millis]
7/30 15:22:46 [INFO] SOAP: Received SOAP response from network [6469 millis]
7/30 15:22:46 [INFO] SOAP: Parsed SOAP response XML [15 millis]
7/30 15:22:46 [INFO] SOAP: Decoding PendingCall response
7/30 15:22:46 [DEBUG] SOAP: Decoding SOAP response envelope
7/30 15:22:46 [DEBUG] SOAP: Decoding SOAP response body
7/30 15:22:46 [INFO] SOAP: Decoded SOAP response into result [16 millis]