About server logs
ArcGIS Server records events that occur in the site, and any errors associated with those events, to logs. Events such as when services are started, when services go into use, and when machines are added to your ArcGIS Server site are all written to the logs. Messages noting layer drawing times in a map service can also be written to the logs.
When the server is running, logs are created and distributed among all GIS server machines participating in your site. The default directory where the server writes its logs is <ArcGIS Server installation drive>\arcgisserver\logs.
The logs are not intended to be accessed and viewed at this location on disk. Instead, use ArcGIS Server Manager to view, query, configure, and delete server logs as described below.
The logs directory is not related to the server directories or the configuration store location. If you modify the location of these directories, the location of the logs will not be affected. If you want to change the location of the logs directory, try to keep the log directory on your GIS server. You shouldn't designate a network directory as the log location.
The role of server logs
Logs are an important tool for monitoring and troubleshooting problems with your site. The logs help identify errors, and through the information in the log you might learn what you can do to address the problem. The logs also comprise a history of the events that occur over time.
For example, an administrator might view the server logs and note that there were a number of errors associated with creating new services within the site. By further examining the logs, the problem area can be narrowed down to a particular GIS server machine. The information in the log message can then be used to discover, for example, that the server machine on which the errors were occurring did not have access to the output directory. Using this information, the administrator can rectify the directory access problem, then use logs to determine whether the error occurs again.
Accessing server logs
Use ArcGIS Server Manager to view, query, configure, and delete server logs. Manager reads the various logs kept by each GIS server machine and aggregates the messages into a table that's easy to read and manipulate.
To access the logs, follow these steps:
- Open Manager and log in. If you need help with this step, see Logging in to Manager.
- Click Logs > View Logs.
- In the View Logs module, use the filter controls to help you query logged events and pinpoint issues with the server. To learn more, see the topic Viewing, querying, and configuring server logs.
- If you want to manage the settings for logging, such as the default level of logging, the number of days to keep logs on disk, and where the server writes its logs, click Settings. For a detailed description of the settings you can specify, see the topic About specifying server log settings.
- If you want to delete the logs, click Delete Logs. This deletes all of the log files from each GIS server participating in your site.
Performing advanced logging
If you're an advanced user of ArcGIS Server, you can view, query, and configure logs through the ArcGIS REST API. This API allows you to programmatically construct advanced queries, modify log settings, and derive statistics over time. You can use the ArcGIS Server Administrator Directory to help you learn how to construct these queries.
There are also several sample scripts available that use the ArcGIS REST API to work with logs, including the following: