Search A Diagnostics Log
/management/weblogic/{version}/serverRuntime/WLDFRuntime/WLDFAccessRuntime/WLDFDataAccessRuntimes/{name}/search
Search this diagnostics log, returning the results in the same text format as the corresponding server-side log files.
Request
- application/json
-
name: string
The name property of the instance in the collection.
-
version: string
The version of the WebLogic REST interface.
-
X-Requested-By: string
The 'X-Requested-By' header is used to protect against Cross-Site Request Forgery (CSRF) attacks. The value is an arbitrary name such as 'MyClient'.
Must contain the following fields:
objectSearch Criteria-
fromId(optional):
integer(int64)
Only return records starting at this record id or later.
This can be used to continue a search that has more matching results than the specified
limitfield. The previous response will return anextRecordId. SetfromIdto that value and POST again to continue the search.This field is optional.
-
lastMinutes(optional):
integer(int64)
Only return records that have been logged in the last n minutes.
This field is optional. If specified, the value must be greater than zero.
-
limit(optional):
integer(int64)
The maximum number of matching records that will be returned.
If there are more available records, then the response will contain the oldest matching records, as well as a
nextRecordIdthat the client can use to continue the search (by settingfromIdto its value).This field must be specified. The value must be greater than zero.
-
query(optional):
string
An optional filter that can be used to restrict which records are returned, for example "SEVERITY = 'Info'". See "WLDF Query Language in Configuring and Using the Diagnostics Framework for Oracle WebLogic Server" for more details.
This field is optional. If not specified, then no filter is applied to the records.
-
since(optional):
string
Only return records that were logged at this time or later.
This field is optional. If specified it must be in one the following formats: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" (e.g. "2016-05-24T13:44:02.349-04:00"), "yyyy-MM-dd'T'HH:mm:ss.SSSXX" (e.g. "2016-05-24T13:44:02.349-0400") or "yyyy-MM-dd'T'HH:mm:ss.SSSX" (e.g. "2016-05-24T13:44:02.349-04").
-
until(optional):
string
Only return records that were logged earlier than this time.
This field is optional. If specified it must be in one the following formats: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" (e.g. "2016-05-24T13:44:02.349-04:00"), "yyyy-MM-dd'T'HH:mm:ss.SSSXX" (e.g. "2016-05-24T13:44:02.349-0400") or "yyyy-MM-dd'T'HH:mm:ss.SSSX" (e.g. "2016-05-24T13:44:02.349-04").
-
Admin: basic
Type:
basicDescription:A user in the Admin security role. -
Deployer: basic
Type:
basicDescription:A user in the Deployer security role. -
Monitor: basic
Type:
basicDescription:A user in the Monitor security role. -
Operator: basic
Type:
basicDescription:A user in the Operator security role.
Response
- text/plain
200 Response
Returns the matching records in the same text format as the corresponding server-side log files. The records are in chronological order, oldest record first.
If there are more matching records than limit specified in the request body, then the oldest limit matching records are returned, and an extra line is added to the response in the form nextRecordId=nnn. It contains the record id of the next matching record. The client can continue the search by POSTing the same query to this resource again, setting fromId to the value of nextRecordId, instead of specifying lastMinutes or since
stringResultsExamples
Start searching a log.
This example uses the POST method to start searching for records in the server log, returning the results as text.
Example Request
curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:text/plain \
-H Content-Type:application/json \
-d "{
limit: 2,
query: 'SEVERITY = \'Info' AND USERID = 'admin'',
lastMinutes: 60
}" \
-X POST http://localhost:7001/management/weblogic/latest/serverRuntime/WLDFRuntime/WLDFAccessRuntime/WLDFDataAccessRuntimes/ServerLog/search
Example Response
HTTP/1.1 200 OK Response Body: ####<[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <1549548507973> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > #### <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <1549548508037> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > nextRecordId=457
Continue searching a log.
This example uses the POST method to continue searching for records in the server log, returning the results as text.
Example Request
curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:text/plain \
-H Content-Type:application/json \
-d "{
limit: 2,
fromId: 457,
query: 'SEVERITY = \'Info' AND USERID = 'admin'',
}" \
-X POST http://localhost:7001/management/weblogic/latest/serverRuntime/WLDFRuntime/WLDFAccessRuntime/WLDFDataAccessRuntimes/ServerLog/search
Example Response
HTTP/1.1 200 OK Response Body: ####Back to Top<[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <1549548509983> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > #### <[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <1549548633097> <[severity-value: 64] [rid: 0:1] [partition-id: 0] [partition-name: DOMAIN] > nextRecordId=1432