Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将查询语句记录到Neo4j服务器,是否可能?_Neo4j - Fatal编程技术网

如何将查询语句记录到Neo4j服务器,是否可能?

如何将查询语句记录到Neo4j服务器,是否可能?,neo4j,Neo4j,我想将整个查询语句记录到Neo4j服务器上,但是,在搜索了SO&我没有成功的文档之后。我发现这个问题很严重,但更改这些配置设置并没有达到我所希望的效果。我在Golang工作&使用该库与Neo4j版本2.1.5中的RESTAPI进行通信 我要寻找的是正在执行的实际查询,理想情况下还需要传递参数。是否可以记录此信息?任何帮助都将不胜感激,谢谢 以下是关于http日志记录的内容,其中还包括查询+参数+结果。 它不适用于生产设置,只适用于调试和测试 这应该从2.1.6开始,请参见: 这是当前通过设置启用

我想将整个查询语句记录到Neo4j服务器上,但是,在搜索了SO&我没有成功的文档之后。我发现这个问题很严重,但更改这些配置设置并没有达到我所希望的效果。我在Golang工作&使用该库与Neo4j版本2.1.5中的RESTAPI进行通信


我要寻找的是正在执行的实际查询,理想情况下还需要传递参数。是否可以记录此信息?任何帮助都将不胜感激,谢谢

以下是关于http日志记录的内容,其中还包括查询+参数+结果。 它不适用于生产设置,只适用于调试和测试

这应该从2.1.6开始,请参见:

这是当前通过设置启用的:

 org.neo4j.server.http.unsafe.content_log.enabled=true
除设置外:

 org.neo4j.server.http.log.enabled=true
conf/neo4j server.properties
中,通过增加模式(
conf/neo4j http logging.xml
)来输出完整的请求和响应:

 <pattern>%fullRequest\n\n%fullResponse</pattern>
这将产生一个
data/log/http.log
文件,其内容如下:

127.0.0.1 - - [04/Jan/2015:11:23:50 +0100] "POST /db/data/transaction/commit HTTP/1.1" 200 372 "http://localhost:7474/browser/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" 
Request:
POST /db/data/transaction/commit HTTP/1.1
Origin: http://localhost:7474
X-stream: true
Cookie: SQLiteManager_currentLangue=4; __jrDevToolbarSessionId=0x1.b6e143f2c334p-3; JSESSIONID=1AFCE7DCF2D5D7134E933871EBF88252; OSESSIONID=OS1412075842834-2614241454738785158; connect.sid=s%3AkRY6%2B4RyW%2FC2ZUMjfIVqtRRo.shdI5G0zTKSq%2BzKevgXzLEdHnwjUDYP1JFlOhupRf2I; _ga=GA1.1.149316633.1397859613; _mkto_trk=id:773-GON-065&token:_mch-localhost-1384123755719-53900; undefined=0; __atuvc=0%7C47%2C0%7C48%2C1%7C49%2C5%7C50%2C13%7C51
Accept: application/json, text/plain, */*
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Referer: http://localhost:7474/browser/
Host: localhost:7474
DNT: 1
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8,de-DE;q=0.6,de;q=0.4
Content-Length: 115
Content-Type: application/json;charset=UTF-8

{"statements":[{"statement":"match (n) return count(*)","resultDataContents":["row","graph"],"includeStats":true}]}
Response:
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

{"results":[{"columns":["count(*)"],"data":[{"row":[0],"graph":{"nodes":[],"relationships":[]}}],"stats":{"contains_updates":false,"nodes_created":0,"nodes_deleted":0,"properties_set":0,"relationships_created":0,"relationship_deleted":0,"labels_added":0,"labels_removed":0,"indexes_added":0,"indexes_removed":0,"constraints_added":0,"constraints_removed":0}}],"errors":[]}

非常感谢迈克尔!
127.0.0.1 - - [04/Jan/2015:11:23:50 +0100] "POST /db/data/transaction/commit HTTP/1.1" 200 372 "http://localhost:7474/browser/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" 
Request:
POST /db/data/transaction/commit HTTP/1.1
Origin: http://localhost:7474
X-stream: true
Cookie: SQLiteManager_currentLangue=4; __jrDevToolbarSessionId=0x1.b6e143f2c334p-3; JSESSIONID=1AFCE7DCF2D5D7134E933871EBF88252; OSESSIONID=OS1412075842834-2614241454738785158; connect.sid=s%3AkRY6%2B4RyW%2FC2ZUMjfIVqtRRo.shdI5G0zTKSq%2BzKevgXzLEdHnwjUDYP1JFlOhupRf2I; _ga=GA1.1.149316633.1397859613; _mkto_trk=id:773-GON-065&token:_mch-localhost-1384123755719-53900; undefined=0; __atuvc=0%7C47%2C0%7C48%2C1%7C49%2C5%7C50%2C13%7C51
Accept: application/json, text/plain, */*
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Referer: http://localhost:7474/browser/
Host: localhost:7474
DNT: 1
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8,de-DE;q=0.6,de;q=0.4
Content-Length: 115
Content-Type: application/json;charset=UTF-8

{"statements":[{"statement":"match (n) return count(*)","resultDataContents":["row","graph"],"includeStats":true}]}
Response:
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

{"results":[{"columns":["count(*)"],"data":[{"row":[0],"graph":{"nodes":[],"relationships":[]}}],"stats":{"contains_updates":false,"nodes_created":0,"nodes_deleted":0,"properties_set":0,"relationships_created":0,"relationship_deleted":0,"labels_added":0,"labels_removed":0,"indexes_added":0,"indexes_removed":0,"constraints_added":0,"constraints_removed":0}}],"errors":[]}