ActionScript 2.0 Components Language Reference |
|
|
|
| Web service classes > Constructor for the Log class | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
myWebSrvcLog= new Log([logLevel] [,logName]);
logLevel A level to indicate the category of information that you want to record in the log. Four log levels are available:
Log.BRIEF The log records primary life-cycle event and error notifications. This is the default value.Log.VERBOSE The log records all life-cycle event and error notifications.Log.DEBUG The log records metrics and fine-grained events and errors.Log.NONE The log records nothing. Can be used to temporarily turn off Log.onLog events.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.
Nothing.
Constructor; creates a Log object. After you create the Log object, you can pass it to a web service to get messages.
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]
|
|
|
|