This resource displays the entries in a server's log.
The resource supports the following methods:
The GET method on this resource returns the server's log.
This method supports the following query parameters which can be used to filter and qualify the results included in the response.
(Optional) Specifies the maximum number of entries to return. If maxResults is not specified, or is less than one, then all of the entries in the log are returned. Otherwise, only maxResults entries are returned. If there are more than maxResults matching entries, the last maxResults entries (based on the order of the entries in the underlying log) are returned.
(Optional) Specifies the earliest log entry to return. Note that you need to encode the query parameter to turn it into a valid URL; a space becomes %20, a '/' (forward slash) becomes %2F, and a ':' (colon) becomes %3A. For example, management/wls/latest/servers/id/myserver/logs/id/mylog?startTime=11/21/14 12:06:53
would become management/wls/latest/servers/id/myserver/logs/id/mylog?startTime=11%2F21%2F14%2012%3A06%3A53
.
(Optional) Specifies the latest log entry to return. Note that you need to encode the query parameter to turn it into a valid URL; a space becomes %20, a '/' (forward slash) becomes %2F, and a ':' (colon) becomes %3A. For example, management/wls/latest/servers/id/myserver/logs/id/mylog?endTime=11/21/14 02:23:15
would become management/wls/latest/servers/id/myserver/logs/id/mylog?endTime=11%2F21%2F14%2002%3A23%3A15
.
(Optional) Specifies a WebLogic Diagnostics Framework (WLDF) query expression which can be used to further filter and qualify the log entries returned.
The response body returned includes a collection of LogEntry entities. The entities are in the same order as the corresponding entries in the underlying log.
This method can return the following links:
uri=/management/wls/{version}/servers/id/{server-name}/logs rel=parent
This method returns one of the Standard HTTP Status Codes.
This example uses the GET method to return the last five entries in the server log.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/logs/id/ServerLog?maxResults=5
Example Response
HTTP/1.1 200 OK Response Body: { "links": [{ "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/logs" }], "items": [ { "timeStamp": "01\/24\/14 13:09:58 604", "message": "The server \"myserver\" connected to this server.", "severity": "Info", "subSystem": "Server", "userId": "WLS Kernel", "contextId": "", "recordId": "90", "msgId": "BEA-002635" }, { "timeStamp": "01\/24\/14 13:09:58 613", "message": "Starting \"async\" replication service with remote cluster address \"null\"", "severity": "Notice", "subSystem": "Cluster", "userId": "WLS Kernel", "contextId": "", "recordId": "91", "msgId": "BEA-000162" }, { "timeStamp": "01\/24\/14 13:09:58 670", "message": "The server started in RUNNING mode.", "severity": "Notice", "subSystem": "WebLogicServer", "userId": "WLS Kernel", "contextId": "", "recordId": "92", "msgId": "BEA-000360" }, { "timeStamp": "01\/24\/14 13:09:59 507", "message": "Server state changed to RUNNING.", "severity": "Notice", "subSystem": "WebLogicServer", "userId": "WLS Kernel", "contextId": "", "recordId": "93", "msgId": "BEA-000365" }, { "timeStamp": "01\/24\/14 13:09:59 512", "message": "Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.", "severity": "Info", "subSystem": "org.hibernate.validator.engine.resolver.DefaultTraversableResolver", "userId": "WLS Kernel", "contextId": "", "recordId": "94", "msgId": "BEA-000000" } ] }