Skip navigation.

WebLogic Server Command Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

 


SERVERLOG

Returns messages from the local log file of a server instance. The command returns messages only from the current log file; it does not return messages in log files that the server instance has archived (renamed) because of log file rotation.

By default, the command returns the first 500 messages from the current log file (messages within the file are ordered from oldest to newest). You can change the default behavior by specifying a time and date range, but you cannot change the number of messages to be returned. The command always returns up to 500 messages, depending on the number of messages in the log file.

For each message, the command returns the following message attributes, separated by spaces:

MessageID TimeStamp Severity Subsystem MessageText

For more information about message attributes, refer to "Message Attributes" in the Administration Console Online Help.

This command can not be used to return the domain-wide log file. You can view the domain-wide log file from the Administration Console. For more information about server log files, refer to "Local Log Files and Domain Log Files" in the Administration Console Online Help.

Syntax

java [ SSL Arguments ] weblogic.Admin
[-url URL]
[ User Credentials Arguments ]
SERVERLOG [starttime [endtime]]

Argument

Definition

-url [protocol://]listen-address:listen-port

Specify the listen address and listen port of the server instance for which you want to retrieve the local log file.

If you use the -url argument to specify the Administration Server, the command returns the local log file of the Administration Server.

If you specify a secure listen port, you must also specify a secure protocol.

If you do not specify a value, the command assumes t3://localhost:7001.

For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.

starttime

Returns up to 500 messages in the current log file with a time stamp that is after the time you specify. The date format is yyyy/mm/dd. Time is indicated using a 24-hour clock. The start date and time are entered inside quotation marks, in the following format: "yyyy/mm/dd hh:mm"

By default, SERVERLOG returns up to 500 messages in chronological order starting from the beginning of the current log file.

endtime

Specifies the end of a time range and causes SERVERLOG to return up to 500 messages with a time stamp that is after starttime and before endtime. The date format is yyyy/mm/dd. Time is indicated using a 24-hour clock. The end date and time are entered inside quotation marks, in the following format: "yyyy/mm/dd hh:mm"

By default, SERVERLOG returns up to 500 messages in chronological order starting with the starttime value and ending with the time at which you issued the SERVERLOG command.


 

Example

The following command returns all messages in the local log file of a server instance named MedRecManagedServer and pipes the output through the command shell's more command:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
-password weblogic SERVERLOG | more

For more information about the environment in which this example runs, refer to Example Environment.

If the command succeeds, it returns output similar to the following truncated example:

130036    Oct 18, 2002 4:19:12 PM EDT Info  XML   Initializing XMLRegistry.
001007 Oct 18, 2002 4:19:13 PM EDT Info JDBC Initializing... issued.
001007 Oct 18, 2002 4:19:13 PM EDT Info JDBC Initialize Done issued.
190000 Oct 18, 2002 4:19:13 PM EDT Info Connector Initializing J2EE Connector Service
190001 Oct 18, 2002 4:19:13 PM EDT Info Connector J2EE Connector Service initialized successfully
...

The following command returns messages that were written to the local log file since 8:00 am today:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
-password weblogic SERVERLOG 08:00

The following command returns messages that were written to the local log file between 8:00 am and 8:30 am on October 18, 2002:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
-password weblogic SERVERLOG "2002/10/18 08:00" "2002/10/18 08:30"

 

Skip navigation bar  Back to Top Previous Next