api/trace
ResourceThe
api/trace
resource returns a fragment of the trace file.For an overview see page eXtremeDB Web Service Resources
To define the size and the location of the trace fragment, the following query arguments can be specified:
count
- return the lastcount
bytes from the trace filefrom
and, optionally,to
- return the trace text starting with thefrom
offset and up to theto
offset, or to the end of the file ifto
is not specifiedThe response is a JSON object which always contains the following keys:
trace
: the trace textfrom
: starting offset of the fragment, relative to the beginning of the fileto
: ending offset of the fragment, relative to the beginning of the fileWith the REST server started (listening on port 8083), the following http request will return the last 100 bytes from the trace file:
GET http://localhost:8083/api/trace?count=100The output returned would look like the following:
{ "trace": "\/mcobject\/eXtremeDB_8.0\/eXtremeDB\/target\/xsql\/mcoxsql\/mcoxsql.cpp:2916-mcorest started at port 8083\n", "from": 5051, "to": 5151 }
The following http request will return the bytes from offset
5051
to the end of the trace file:GET http://localhost:8083/api/trace?from=5051The output returned would look like the following:
{ "trace": "\/mcobject\/eXtremeDB_8.0\/eXtremeDB\/target\/xsql\/mcoxsql\/mcoxsql.cpp:2916-mcorest started at port 8083\n", "from": 5051, "to": 5151 }
The following http request will return the bytes from offset
5051
to offset 5100 of the trace file:GET http://localhost:8083/api/trace?from=5051&to=5100The output returned would look like the following:
{"\/mcobject\/eXtremeDB_8.0\/eXtremeDB\/target\/xsql\/mco", , "from": 5051, "to": 5100 }