Hi, You need to remove the file path from the LOGNAME. The following should work:
STAF local LOG QUERY GLOBAL LOGNAME test/TestLog Note that most STAF LOG requests will work as expected when using subdirectories of the root log directory, however, at least on my Windows system, you must create the subdirectory (in this case "test") before writing to the log, and a LOG LIST request will not show the subdirectory logs. $ STAF local LOG LOG GLOBAL LOGNAME test/TestLog MESSAGE msg1 LEVEL info Error submitting request, RC: 17 Additional info --------------- c:\build\rel\win32\staf\retail\data\STAF\service\log\GLOBAL\test/TestLog.log $ STAF local FS CREATE DIRECTORY {STAF/DataDir}/service/log/GLOBAL/test Response -------- $ STAF local LOG LOG GLOBAL LOGNAME test/TestLog MESSAGE msg1 LEVEL info Response -------- $ STAF local LOG LOG GLOBAL LOGNAME test/TestLog MESSAGE msg2 LEVEL info Response -------- $ STAF local LOG LIST GLOBAL Response -------- $ STAF local LOG QUERY GLOBAL LOGNAME test/TestLog Response -------- Date-Time Level Message ----------------- ----- ------- 20100112-08:52:06 Info msg1 20100112-08:52:09 Info msg2 $ STAF local LOG PURGE GLOBAL LOGNAME test/TestLog FIRST 1 CONFIRM Response -------- Purged Records: 1 Total Records : 2 $ STAF local LOG QUERY GLOBAL LOGNAME test/TestLog Response -------- Date-Time Level Message ----------------- ----- ------- 20100112-08:52:09 Info msg2 $ STAF local LOG DELETE GLOBAL LOGNAME test/TestLog CONFIRM Response -------- Thanks, David David Bender STAF/STAX Development IBM Software Group, WPLC 11501 Burnet Rd. Bldg. 903-5B002 Austin, TX 78758-3400 Phone (T/L): 1-512-286-5315 (363-5315) ITN: 23635315 Email: bda...@us.ibm.com From: Uma Chilukuri <chilukuri_...@yahoo.com> To: staf-users@lists.sourceforge.net Date: 01/12/2010 08:32 AM Subject: [staf-users] Logging into sub folder of LOG directory using LOG Service Hi, I'm trying to log into subdirectory of root log directory using Perl script with API STAF::Log::Init() and STAF::Log::Log() with GLOBAL log file. It is creating the log file in subfolder. When I try to read the log file with QUERY request it is giving the error 48. [:~/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL/test]$STAF local LOG QUERY GLOBAL LOGNAME /home/test/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL/test/TestLog Error submitting request, RC: 48 Additional info --------------- /home/test/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL/test/TestLog Log file is present in the folder. [:~/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL/test]$ls /home/test/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL/test/TestLog.log /home/test/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL/test/TestLog.log But when I move the file to root directory it is able to read the file. [:~/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL]$STAF local LOG QUERY GLOBAL LOGNAME TestLog Response -------- Date-Time Level Message ----------------- ------- -------------------------------- 20100111-01:51:32 Warning 1234-015132-ABCD 20100111-01:51:32 Warning 1234-015132-123 20100111-02:13:40 Warning 1234-021340-ABCD 20100111-02:13:40 Info 1234-021340-123 20100111-02:16:17 Warning 1234-021617-ABCD Note that FmtLog utility is able to read it from sub folder. [:~/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL/test]$FmtLog FORMAT LOGFILE /home/test/SRC/STAF/rel/linux/staf/debug/logdata/GLOBAL/test/TestLog.log newfile aaa Formatted 5 record(s) to aaa Please let me know what to do using QUERY service. Thanks Uma. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. ------------------------------------------------------------------------------ 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