Here I use the DEMO that comes with the system, demo path is C: \ Users \ Public \ Documents \ SQL Anywhere 17 \ Samples \ SQLAnywhere \ HTTP 1.run web service : dbsrv17.exe -c 8m -n demo17 demo.db -xs HTTP(PORT=8880) -zoc clientinfo.txt 2.CALL sa_server_option( 'WebClientLogging', 'ON' ); 3.The data can be displayed normally on the web page:http://127.0.0.1:8880/getinfo 4. Blank when opening log file,no data in clientinfo.txt |
I don't know whether this is still relevant, but when you want to log the requests being received by the server use this: CALL sp_start_listener('HTTP','127.0.0.1:8880','LOG=c:\temp\http.log'); Found it here http://dcx.sap.com/sqla170/en/html/3be336f56c5f1014a34cab0e812f9155.html To add: To turn on web server logging permanently, you can do so by using the according -xs network protocol options like LogFile, LogFormat, LogMaxSize and LogOptions, such as dbsrv17.exe -c 8m -n demo17 demo.db -xs HTTP(PORT=8880;LOG=C:\MyHttpServer.Log;LOPT=ALL)
(18 Jun '20, 11:45)
Volker Barth
|
The web client log traces calls by SQL Anywhere as a web client, using web client functions/procedures. Do you have called one of those? Thank you for your reply. Isn't it "http://127.0.0.1:8880/getinfo" in the IE or google chrome, The web service client log file contains HTTP requests and transport data recorded for outbound web service client calls. The web service client log file can also be specified using the sa_server_option system procedure: CALL sa_server_option( 'WebClientLogFile', 'clientinfo.txt' );Logging is enabled automatically when you specify the -zoc server option. You can enable and disable logging to this file using the sa_server_option system procedure: CALL sa_server_option( 'WebClientLogging', 'ON' );Example The following command starts the database server so that it listens for HTTP web requests on port 80, and logs outbound web service client information to the file clientinfo.txt: dbsrv17 web.db -xs HTTP(PORT=80) -zoc clientinfo.txt
(05 Feb '20, 11:50)
mfkpie8
Replies hidden
No, you seem to call a SQL Anywhere web service via your browser, so SQL Anywhere acts as web server (i.e. answering a HTTP request). As stated, the web client logging feature traces SQL Anywhere acting as a web client (i.e. raising a HTTP request).
(05 Feb '20, 12:11)
Volker Barth
Comment Text Removed
Documentation:http://dcx.sap.com/index.html#sqla170/en/html/3bd4ebcb6c5f1014b6598ff994170e86.html Documentation: http://dcx.sap.com/index.html#sqla170/en/html/3bc839556c5f1014b769935fcbd25839.html
(06 Feb '20, 00:06)
mfkpie8
Yes, that is the documentation on logging web requests by SQL Anywhere as a web client. As stated, that will not log the requests SQL Anywhere gets and answers when used as a web server, and you are using it as a web server.
(06 Feb '20, 05:41)
Volker Barth
Comment Text Removed
It turns out that I use asa as a client to access the work log function tracked by other servers. How should the server log be tracked? Browsing logs similar to windows IIS
(07 Feb '20, 01:40)
mfkpie8
I found a related post https://sqlanywhere-forum.sap.com/questions/1221/is-this-how-i-have-to-trap-exceptions-raised-by-the-final-select-in -a-web-service. But would you like to inquire that the ASA as a server does not have its own log tracing function? Otherwise this will cause performance degradation. Windows iiS has a built-in log trace function. Doesn't ASA have it? Do I have to use stored procedures or functions to solve this problem?
(07 Feb '20, 02:45)
mfkpie8
|