Logging
Logging Options
This section describes logfiles for the geoportal web application and its Desktop Tools.
Geoportal web application logging
When errors or other problems occur in the Geoportal interface, the best place to look for information is the log files. The geoportal web application logging described here is in the context of implementations using Apache Tomcat for geoportal logging or Oracle WebLogic for geoportal logging as the web application server. For other supported web application server software, you can use the concepts described in this section and apply them to the java util logging framework.
Geoportal logging for Apache Tomcat
Tomcat's log files are by default found in the <Tomcat Installation Directory>\logs directory. In addition to the standard files that are created by Tomcat, the logs directory will also contain an ArcGIS Server Geoportal extension log file, named gpt.xxxxxx.log where xxxxxx is the date in yyyy-mm-dd format. This log file is the first place to check for errors. Additional details about Tomcat's logging mechanism can be found here.
The ArcGIS Server Geoportal extension 10 allows setting the level of logging to get more or less detail in geoportal log files. The level of details written to the gpt.xxxxx.log file is set in the <Tomcat Installation Directory>\webapps\geoportal\WEB-INF\classes\logging.properties file. The variable com.esri.gpt.level determines the logging level and is set to FINE by default. Accepted values for the logging level are:
- SEVERE
- WARNING
- INFO
- CONFIG
- FINE
- FINER
- FINEST
- ALL
Setting the log level to FINER, FINEST, or ALL is suitable troubleshooting, but the log level should be set back to its original level when troubleshooting is complete. Leaving logging set to these levels will cause the logfile to grow large quickly and take up disk space.
Geoportal logging for Oracle WebLogic
Weblogic does not pick up the default geoportal logging.properties file in the geoportal classes directory. In order to affect the logging properties, you must edit the main logging.properties for the java executable running WebLogic. Steps below discuss how to enable generating a logfile for the geoportal web application and writing it to an output directory of your choice. For more information, see the Oracle online documentation for WebLogic logging.
- Locate the java executable running weblogic, and within that folder, open its logging.properties file in a text editor. Tip:
Sometimes the WebLogic java executable's logging.properties file can be found in the \\bea\jrockit\jre\lib or \\Oracle\Middleware\jdk\jre\lib folder.
- In the logging.properties file, find the java.util.logging.ConsoleHandler.level parameter, and change the setting from the default INFO to FINER.
- In that same file, scroll to the end of the file where the # Facility specific
properties. are defined. Beneath the example line for the com.xyz.foo.level =
SEVERE facility, enter the following:
com.esri.gpt.level = FINER
- Save the logging.properties file.
- The weblogic server scripts by default log all messages to the server's console. To redirect these to a log file, you need to edit the WebLogic Server startup script. Start by navigating to the startWebLogic.cmd file and opening it in a text editor. The startWebLogic file is often found in the \\wlserver_10\samples\domains\wl_server\bin folder, or a similar filepath.
- In the startWebLogic.cmd file, find the line that reads:
set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS%
- Add two additional parameters to this JAVA_OPTIONS variable. The two parameters will define the name of two geoportal logfiles, and the location to which they should be written. In our exampe, we write these two logfiles to the C:\ drive. The two parameters are -Dweblogic.Stdout="C:\geoportal-stdout" and -Dweblogic.Stderr="C:\geoportal-stderr". The JAVA_OPTIOINS variable should now look like the example below.
set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS% -Dweblogic.Stdout="C:\geoportal-stdout" -Dweblogic.Stderr="C:\geoportal-stderr"
- Save the startWebLogic.cmd file.
- Restart the WebLogic service. After the service starts, your geoportal logfiles should be written to the C:\ drive.
Enable logging for the Geoportal Clients
Logging for the CSW Clients, Publish Client, and WMC Client is turned off by default. To enable logging, specify the logfile output path, and define the maximum logfile size, you must configure property files for the Clients. These property files are found in the ArcGIS Desktop installation directory, in the \\ArcGIS\Desktop10.0\bin folder, and are installed when the Client itself is installed. For the CSW Clients for ArcGIS Explorer, the property file is found at \\\Explorer\bin. The corresponding property file for each Client is shown below.
If you navigate to the \\ProgramFiles\ESRI\Geoportal\ directory, you will see subfolders for the Clients that also contain property files. These are templates used during the Client's installation, and are not referenced for any logging changes. Be sure to make any logging changes to the property files in the \\ArcGIS\Desktop10.0\bin folder instead.
Geoportal Client Name | Property file in \\ArcGIS\Desktop10.0\bin |
---|---|
CSW Clients | CswClient.properties |
Publish Client | PublishClient.properties |
WMC Client | WMCOpener.properties |
Setting | Description | Accepted Values |
---|---|---|
logFolder | Location to where logfiles should be written | filepath accessible on the network |
maxLogFileSizeInBytes | maximum size allowable for logfile | integer |
debug | sets logging on or off Note: Unlike geoportal web application logging, there is only two levels of logging for the clients: on or off | on / off default is off |
The CswClient.log file for the CSW Clients
Once you've enabled logging for the CSW Clients, you can investigate the logfile to see the requests sent from the CSW Clients to the CSW catalog endpoints. For more information about the requests and responses managed by the CSW Client, see How the CSW Clients Work. Investigating the communication in the CswClient.log file can often reveal if there is a problem with the endpoint, the profile being used to communicate, or another communication issue.
The publishMetadata.log file for the Publish Client
Once you've enabled logging for the Publish Client, you can investigate the publishMetadata.log logfile for information on your publish sessions and publish session results in more detail. A sample logfile is shown and described below. You may see other messages besides what is shown in the sample, depending on the resource that is published and if the session was successful.
************ Metadata Publishing started at 7/28/2010 11:20:38 AM ************ Publication Parameters ============================================================ Metadata Server Url : http://myserver:8080/geoportal Publish Metadata Service Name : GPT_Publish_Metadata Selected Workspace Name : \\networkServer\C$\Data\districts.shp.xml Selected container category : XML Document ============================================================ EndPoint Type : DEFAULT Publish url : http://myserver:8080/geoportal/rest/manage/document Publish request : <metadata xml here> Publish response : Publication successful for \\networkServer\C$\Data\districts.shp.xml ************ Metadata Publishing completed at 7/28/2010 11:20:46 AM ************
This logfile shows the start and end time of the publish session, the input parameters for the session, and the response if the publish session was successful or not. The Publish request includes the metadata in the documents that the Publish Client finds and publishes. The EndPoint Type indicates if the default geoportal endpoint - which is the REST endpoint - is being used, or if the CSW endpoint or servlet endpoint is used. The Publish url is the url to that endpoint. In this example, you can see that the REST endpoint url is listed.
The WMCOpener.log for the WMC Client
Once you've enabled logging for the WMC Client, you can investigate the WMCOpener.log logfile for information on the services referenced when you used the WMC Client. The WMCOpener.log will provide the service information read from the WMC file, and report if the layer was actually added to the map. If there is a problem with the service and it is not added to the map, the service information will be listed in the log, but it will not say that it has been added.