Logs management

Feedback


Open iServer WebManager, and view log information on the Log tab when SuperMap iServer server is running. The Log system of SuperMap iServer includes system log, operation log, service access log and network data check log. The service access log is stored in %SuperMap iServer_HOME%/logs, supporting to download service access log to the local form the server. Please refer to Service access logs for more information.

System logs

Log information is divided into 6 levels: Off, Error, Warn, Info, Debug, and All. Please refer to Table 1 Level Description of System Logs.

Table 1 Level Description of System Logs

Level Description

Off

Contains no information.

Error

Contains only errors.

Warn

Warnings. This level also contains errors.

Info

Business logic information when the server is running, such as the information telling that the service has been created successfully. This level also contains errors and warnings.

Debug

The prompt about code execution when the server is running. This level also contains information, warnings, and errors.

All

Contains all information.

The system log of current server will be listed on the Logs tab, including log level, Abstract, Time. You can filter the logs to display by level and number of displayed items, as below shown:

Operation logs

The operation log is the operation records of the service manager, and the records that service visitors edit the detailed GIS services, such as add, modify, delete and so on.

The operation logs only have one level: Info. Please refer to Table 2 Level Description of Operation Logs.

Table 2 Level Description of Operation Logs

Level Description

Info

Business logic information when the server is running, such as the information telling that the service has been created successfully. This level also contains errors and warnings.

The operation log of current server will be listed on the Logs tab, including log level, Abstract, Time. You can filter the logs to display by number of displayed items, as below shown:

Service access logs

Service access logs is that service administrator controls all services published by SuperMap iServer, and get the HTTP request data stream HAR file.

HAR (HTTP Archive), is a common file format to store HTTP request response information based on JSON. The HAR file can be used by other HTTP analysis tools (Fiddler, Firebug, httpwatch, etc.), which is used to analyze all the exception information of service interaction published by Client and SuperMap iServer. Noe it supports HAR1.2. The HAR file should be UTF-8.

A HAR file is a JSON object. You can view it by JsonView tool. The data structure of HAR is as follows:

{

  "log" : {

    "version" : "1.2",

    "creator" : {},

                    "browser" : {},

                    "pages" : {},

    "entries" : {},

    "comment" : ""

              }

}

In the Logs/Service Access Logs tab, it will list all service access logs of the current server. There are two rows: File name and File size. It provides the Download logs button to down the logs to local, as shown below:

Click the Download logs button,and you can download all service access logs to the local as .zip, as shown below:

After unzip the service access log, there are .har files (You can configure the name of service access log through Service Access Logs). You can open these .har files by the HTTP tools (such as Fiddler, Firebug, httpwatch, etc.) to analyze the abnormal interactions between the client and the server.

For example, we can take the Fiddler as an example. Open the Fiddler, and select File->Import Sessions. Select HTTPArchive in the pop up dialog box and click Next to find the .har files. The HTTP request data will be listed in the left of Fiddler page. If you select one or more HTTP request data and click the Replay button, the details of abnormal services will reappear (the passed parameter), which makes it easier for users and support professional to further analysis, debugging and processing.

Logs configuration

Log configuration contains the configuration of system logs, operation logs and service access logs:

System logs configuration

In the Logs/Log Configuration tab, you can configure SuperMap iServer system log, please refer to Table 3 Parameters Description for System Logs Configuration. After configuring, click Save.

Table 3 Parameters Description for System Logs Configuration

Parameter Description

File storage path

It is used to store the full path or relative path of logs (relative to bin), included the file name. The system log is ../logs/iserver.log, namely, %SuperMap iServer_HOME%/logs/iserver.log by default.

File size restriction

Max file size limits the maximum log file size, and the default is 2 MB. If the file size is greater than this value, the server will clear up the log file after backup. For example, iserver.log will backup, in order, iserver.og.1, iserver.log.2,...

The console output log level.

Select the proper console log levels in the corresponding drop-down list, please refer to Table 1 Level Description of System Logs.

Log level of file records

Select the proper log level of file records in the corresponding drop-down list, please refer to Table 1 Level Description of System Logs.

Operation logs configuration

In the Logs/Log Configuration tab, you can configure SuperMap iServer operation log, please refer to Table 4 Parameters Description for Operation Logs Configuration. After configuring, click Save.

Table 4 Parameters Description for Operation Logs Configuration

Parameter Description

File storage path

It is used to store the full path or relative path of logs (relative to bin), included the file name. The operation log is ../logs/iserverOperation.log, namely, %SuperMap iServer_HOME%/logs/iserverOperation.log by default.

File size restriction

Max file size limits the maximum log file size, and the default is 2 MB. If the file size is greater than this value, the server will clear up the log file after backup. For example, iserverOperation.log will be backup, in order, iserverOperation.log.1, iserverOperation.log.2...

Log level of file records

The operation logs only have one level: Info. Please refer to Table 2 Level Description of Operation Logs.

Service access logs configuration

In the Logs/Log Configuration tab, you can configure SuperMap iServer service access log, please refer to Table 5 Parameters Description for Service Access Logs Configuration. After configuring, click Save. The default storage is: %SuperMap iServer_HOME%/logs/iServerHTTPArchive.har.

Table 5 Parameters Description for Service Access Logs Configuration

Parameter Description

Enable

SuperMap iServer server disables the service access logs by default. You need to enable it manually, that is, check the box on the right.

Log file name

The file name of output service access log. The default name is iServerHTTPArchive. It supports to customize.

Service URL

The service URL of SuperMap iServer supports wildcard *and ? (* means zero or more characters, and ? means a single character). It supports to add multiple service URL addresses, which can monitor multiple services. Please refer to URL Settings of Services.

Note:

  • The default publishing address of SuperMap iServer is: http://localhost:8090/iserver/services. If you want to monitor all services, you can input the URL: http://localhost:8090/iserver/services/*.
  • In order to ensure URL effectiveness after immigrating iServer, or avoid repeat adding URl when iServer is accessed by multiple domain names and ip, the system will filter out the IP address and domain name automatically when adding the monitoring service URL address. The URL address starts with "/services".
  • The system will also filter out the expression format or URL parameter automatically when adding the monitoring service URL address. For example, if users want to monitor all requests sent by http://localhost:8090/iserver/services/map-china400/rest/maps/China, and you enter the URL address: http://localhost:8090/iserver/services/map-china400/rest/maps/China.ijs, the system will filter out the expression format .ijs. It has no effect for the monitoring.

Added

The added monitoring service URL starts with "/services" by default.

You can configure service access logs through XML configuration file (Refer to iServer configuration file introduction). Add the following configuration information to iserver-system.xml:

<harLog>
    <enabled>false</enabled> 
    <name>iServerHTTPArchive</name> 
    <monitorURLs/>
</harLog>

Network data checking logs

When starting iServer, the background program will check the network dataset and turn table, and throw a warning for network dataset. If it needs the transportation analysis, it should adjust the network data according the log to ensure the correctness of the network analysis function.

For example, when starting iServer services, the console quotes the following warning:

You can modify the network dataset according to warnings to ensure the correctness of the network analysis function.