Yes, you can log any message to a STAF log file, including marshalled data, and you can also access the marshalled form of the message later through a perl script and use the STAF Perl unmarshall API to unmarshall the log message later. For example:
$rc = STAF::Log::Log("Info", $STAF::Result); If the entire message logged is in a marshalled form, if you query the STAF log via a LOG QUERY request, it will automatically unmarshall the message so that it is displayed in a viewable format. Note that by default, STAF recursively unmarshalls nested objects (so that it unmarshalls a message in a log file being queried that contains a marshalled data string), though you can also override it to not recursively unmarshall nested objects by setting the IGNORE_INDIRECT_OBJECTS flag. The marshalled form of the message is accessible programmatically (e.g. via Perl, Java, Python, C/C++). Section "4.1.3 Class STAF::STAFResult" in the STAF Perl User's Guide at http://staf.sourceforge.net/current/STAFPerl.htm#Header_ResultNew talks about the member variables in a STAFResult object that you can access. You can access the "result" member variable which is a string that contains the marshalled data. Note that STAF V3.3.1 or later performs auto-unmarshalling by default, so the unmarshalled result is already available to you without you having to call the Perl STAF::STAFUnmarshall($STAF::Result) API (e.g. via the "resultContext" / "resultObj" member variables). -------------------------------------------------------------- Sharon Lucas IBM Austin, luc...@us.ibm.com (512) 286-7313 or Tieline 363-7313 "Uma Maheswar Chilukuri" <u...@mach.com> 01/12/2010 06:27 AM To <staf-users@lists.sourceforge.net> cc Subject [staf-users] Logging $STAF::Result Hi, Is it possible to log $STAF::Result directly to log file with unmarshalling and marshalling the log message later through a perl script? E.g: After a submit request STAF::Log::Log("WARNING", " $STAF::Result"); Thanks Uma. ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users