Use session_log rather than yaz_log
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 4 Nov 2011 12:55:14 +0000 (13:55 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 4 Nov 2011 12:55:16 +0000 (13:55 +0100)
When displaying whether a client is newly created or reused.

src/session.c
test/test_http_67.res [new file with mode: 0644]
test/test_http_68.res [new file with mode: 0644]
test/test_http_69.res [new file with mode: 0644]
test/test_http_70.res [new file with mode: 0644]
test/test_http_71.res [new file with mode: 0644]
test/test_http_72.res [new file with mode: 0644]

index 0006652..2bb1de2 100644 (file)
@@ -751,7 +751,7 @@ enum pazpar2_error_code session_search(struct session *se,
             no_failed++;
         else if (parse_ret == 0)
         {
-            yaz_log(YLOG_LOG, "client NEW %s", client_get_id(cl));
+            session_log(se, YLOG_LOG, "client NEW %s", client_get_id(cl));
             no_working++;
             if (client_prep_connection(cl, se->service->z3950_operation_timeout,
                                        se->service->z3950_session_timeout,
@@ -761,7 +761,7 @@ enum pazpar2_error_code session_search(struct session *se,
         }
         else
         {
-            yaz_log(YLOG_LOG, "client REUSE %s", client_get_id(cl));
+            session_log(se, YLOG_LOG, "client REUSE %s", client_get_id(cl));
             no_working++;
             if (client_prep_connection(cl, se->service->z3950_operation_timeout,
                                        se->service->z3950_session_timeout,
diff --git a/test/test_http_67.res b/test/test_http_67.res
new file mode 100644 (file)
index 0000000..d486aeb
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<error code="8" msg="No targets"></error>
\ No newline at end of file
diff --git a/test/test_http_68.res b/test/test_http_68.res
new file mode 100644 (file)
index 0000000..e506085
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bytarget><status>OK</status></bytarget>
\ No newline at end of file
diff --git a/test/test_http_69.res b/test/test_http_69.res
new file mode 100644 (file)
index 0000000..5a1147b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>0</activeclients>
+<merged>0</merged>
+<total>0</total>
+<start>0</start>
+<num>0</num>
+</show>
\ No newline at end of file
diff --git a/test/test_http_70.res b/test/test_http_70.res
new file mode 100644 (file)
index 0000000..ab63fe6
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<search><status>OK</status></search>
\ No newline at end of file
diff --git a/test/test_http_71.res b/test/test_http_71.res
new file mode 100644 (file)
index 0000000..b24d50f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bytarget><status>OK</status>
+<target><id>z3950.indexdata.com/marc</id>
+<name>Index Data MARC test server</name>
+<hits>1</hits>
+<diagnostic>0</diagnostic>
+<records>1</records>
+<state>Client_Idle</state>
+</target></bytarget>
\ No newline at end of file
diff --git a/test/test_http_72.res b/test/test_http_72.res
new file mode 100644 (file)
index 0000000..ecb7374
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>0</activeclients>
+<merged>1</merged>
+<total>1</total>
+<start>0</start>
+<num>1</num>
+<hit>
+
+<md-title>The religious teachers of Greece</md-title>
+<md-date>1972</md-date>
+<md-author>Adam, James</md-author>
+<md-description>Reprint of the 1909 ed., which was issued as the 1904-1906 Gifford lectures</md-description><location id="z3950.indexdata.com/marc" name="Index Data MARC test server">
+<md-title>The religious teachers of Greece</md-title>
+<md-date>1972</md-date>
+<md-author>Adam, James</md-author>
+<md-description tag="500">Reprint of the 1909 ed., which was issued as the 1904-1906 Gifford lectures</md-description>
+<md-description tag="504">Includes bibliographical references</md-description>
+<md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
+<md-test-usersetting-2>test-usersetting-2 data: 
+        YYYYYYYYY</md-test-usersetting-2></location>
+<relevance>120000</relevance>
+<recid>content: title the religious teachers of greece author adam james medium book</recid>
+</hit>
+</show>
\ No newline at end of file