1. Overview of GlassFish Server Administration
Default Settings and Locations
Instructions for Administering GlassFish Server
4. Administering the Virtual Machine for the Java Platform
6. Administering Web Applications
7. Administering the Logging Service
Configuring the Logging Service
Changing the Name and Location of Logging Service Files
To Change the Name and Location of the Log File
To Change the Name and Location of the Logging Properties File
To Change the Rotation File Size
To Change the File Rotation Interval
To Change the Limit Number of Retained Files
Adding a Custom Logging Handler
8. Administering the Monitoring Service
9. Writing and Running JavaScript Clients to Monitor GlassFish Server
10. Administering Life Cycle Modules
11. Extending and Updating GlassFish Server
Part II Resources and Services Administration
12. Administering Database Connectivity
13. Administering EIS Connectivity
14. Administering Internet Connectivity
15. Administering the Object Request Broker (ORB)
16. Administering the JavaMail Service
17. Administering the Java Message Service (JMS)
18. Administering the Java Naming and Directory Interface (JNDI) Service
19. Administering Transactions
The recommended means for general viewing of logging information is to use the Log Viewer in the Administration Console. The Log Viewer simplifies reading, searching, and filtering log file contents. For instructions, see the Administration Console online help.
Oracle GlassFish Server also allows you to collect log files into a ZIP archive, which provides the means to obtain and view log files for an instance or cluster even when it is not currently running. The following section explains how to collect all available log files for an instance or cluster and compile them into a single ZIP archive, which is done by using the collect-log-files subcommand.
Use the collect-log-files subcommand in remote mode to collect log files into a ZIP archive. The default target of this subcommand is the DAS. Optionally you can target a configuration, server, instance, or cluster.
Remote subcommands require a running server.
The default location in which the ZIP archive is created is the domain-dir/collected-logs directory. The collect-log-files subcommand allows you to specify a nondefault directory in which the ZIP archive is to be created by using the --retrieve option set to true, followed by the directory name.
The name of the ZIP file contains the timestamp, as follows:
log_yyyy-mm-dd_hh-min-sec.zip
Example 7-13 Creating a ZIP Archive
This example shows collecting the log files for the cluster MyCluster and compiling them into a ZIP archive in the /space/output directory.
asadmin> collect-log-files --target MyCluster --retrieve true /space/output Log files are downloaded for ClusterServer1. Log files are downloaded for ClusterServer2. Created Zip file under /space/output/log_2011-02-10_13-35-25.zip. Command collect-log-files executed successfully.
When the ZIP file created by the preceding command is uncompressed, the following directory structure is created:
as-install-parent/ glassfish/ domains/ domain-name/ collected_logs/ logs/ ClusterServer1/ server.log ClusterServer2/ server.log
See Also
You can view the full syntax and options of the subcommand by typing asadmin help collect-log-files at the command line.