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

asked 05 Feb, 10:21

mfkpie8's gravatar image

mfkpie8
158465259
accept rate: 14%

edited 05 Feb, 10:24


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?

permanent link

answered 05 Feb, 11:40

Volker%20Barth's gravatar image

Volker Barth
35.0k338496733
accept rate: 33%

converted 05 Feb, 12:12

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, 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, 12:11) Volker Barth
Comment Text Removed

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, 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, 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, 02:45) mfkpie8
showing 1 of 6 show all flat view
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×158

question asked: 05 Feb, 10:21

question was seen: 69 times

last updated: 07 Feb, 02:45