Log Management |
Open the service management server, and you can view the log information during the running of the SuperMap iServer server under the "Log" tab. SuperMap iServer logs include system logs, operation logs, distributed analysis logs, service access logs, and network data check logs. The service access logs information is stored in %SuperMap iServer Java_HOME%/logs by default, and supports downloading service access logs files from the server to the local. For an introduction to the service access logs, Please check the service access logs .
The system logs information is divided into six levels: shutdown, error, warning, information, debug, and all. See Table 1 Explanation of System Log Information Level for level descriptions..
Table 1 Explanation of System Log Information Level
Level | Explain |
Shutdown |
Does not contain any information. |
Error |
Contains error messages only. |
Warning |
Warning message. This level also contains the content of the error message. |
Information |
Business logic information in the process of server running, such as the message of successful service creation. This level also contains the contents of error messages and warning messages. |
Debug |
Prompts about code execution while the server is running. This level also contains information, warnings, and errors. |
All |
Contains all messages. |
The "Logs/System Logs" tab lists the system logs of the current server, including log level, log abstract, and time. You can filter the display of the log by "level".
The operation logs are the records of operations performed by the service administrator in the service management server and the records of editing operations performed by service visitors on specific GIS services, such as adding, modifying, and deleting features.
The operation logs information has only one level: information. See Table 2 Explanation of Operation Log Information Level for level descriptions.
Table 2 Explanation of Operation Log Information Level
Level | Explain |
Information |
Business logic information in the process of server running, such as the message of successful service creation. This level also contains the contents of error messages and warning messages. |
The "Log/Operation Logs" tab will list the operation logs status of the current server, which is displayed in several columns such as log level, log abstract, and time. You can filter the display of the log by "level".
The distributed analysis logs refers to the operation records and service status information executed by the SuperMap iServer distributed analyst service during the use of the user. Such as startup duration, service address, etc. This log applies only to SuperMap iServer product.
The operation logs information has only one level: information. See Table 3 Explanation of Distributed Analysis Log Information Level for level descriptions.
Table 3 Explanation of Distributed Analysis Log Information Level
Level | Explain |
Information |
The distributed analyst service uses business logic information as well as status information during the process, such as messages that the service started successfully. This level also contains the contents of error messages and warning messages. |
The "Log/Distributed Analysis Logs" tab lists the distributed analysis logs status of the current server, including log level, log abstract, and time. You can filter the display of the log by "level".
The service access logs means that the service administrator monitors all the services published by the SuperMap iServer and obtains the HTTP Request a data stream HAR file.
HAR(HTTP Archive), It is a universal file format used to store HTTP request response information, based on JSON. The obtained HAR file can be used by other HTTP analysis tools that support HAR, including Fiddler, Firebug, httpwatch, etc., to analyze anomalies in all service interactions published by the client and SuperMap iServer server. Currently, the latest version of HAR specification supported is HAR1.2. HAR files must be encoded in UTF-8.
A HAR file is a JSON object, which can be viewed through the JsonView tool. The data structure of the HAR is as follows:
{
"log" : {
"version" : "1.2",
"creator" : {},
"browser" : {},
"pages" : {},
"entries" : {},
"comment" : ""
}
}
The "Log/Service Access Logs" tab displays a list of service access logs files on the current server in two columns, file name and file size, and provides a "Download Logs" button. Support the packaging and downloading of service access logs files from the server to the local.
Click "Download Logs" to download all service access logs files on the server to the local in the form of.zip compressed package.
The service access log file downloaded locally is decompressed into one or more .har files (the name of the service access log file can be configured through the service access log configuration), which can be opened using HTTP analysis tools that support HAR files (such as Fiddler, Firebug, httpwatch, etc.) to analyze abnormal interactions between client and server-side services.
For example, we can use Fiddler to analyze the obtained .har file, open the Fiddler tool, and select File-> Import Sessions option, select HTTPArchive format in the pop-up dialog box, click Next, find the .har file and open it. At this time, the monitored HTTP request data will be displayed on the left side of the Fiddler page. Select one or several HTTP request data and click the Replay button in the toolbar to reproduce the specific situation of the abnormal service monitored by the user (such as the parameters passed), which is convenient for users and technical support personnel to further debug, analyze and handle.
The log configuration page contains the configuration of system logs, operation logs, distributed analysis logs, and service access logs. The specific configuration information is described as follows:
The SuperMap iServer system logs can be configured under the "Log/Log Configuration" tab of the service management server. Please refer to Table 4 Explanation of System Log Configuration Parameters for the description. After the configuration is completed, click Save button to save.
Table 4 Explanation of System Log Configuration Parameters
Parameter | Explain |
File path: |
Full path or relative path (relative to the bin directory) used to store log files. Note the include file name. The system logs default is ../logs/iserver.log. That is, %SuperMap iServer_HOME%/logs/iserver.log. |
Max file size: |
The file size limits the maximum size of the log file. The default is 2MB. When the file size is larger than 2MB, the server backs up and empties the log file, such as iserver.log. Backup sequentially as iserver.log.1, iserver.log.2……. |
Console log level: |
Select the appropriate console output log level from the corresponding dropdown menu. For specific level descriptions, please refer to Table 1 Explanation of System Log Information Level. |
File log level: |
Select the appropriate file log level in the corresponding position drop-down box:. For specific level descriptions, see Table 1 Explanation of System Log Information Level. |
The "Log/Operation Logs" tab allows you to configure the SuperMap iServer operation logs, Please refer to Table 5 Explanation of Operation Log Configuration Parameters for the description. After the configuration is completed, click Save button to save.
Table 5 Explanation of Operation Log Configuration Parameters
Parameter | Explain |
File path: |
Full path or relative path (relative to the bin directory) used to store log files. Note the include file name. The operation logs default is ../logs/iserverOperation.log. That is, %SuperMap iServer_HOME%/logs/iserverOperation.log. |
Max file size: |
The file size limits the maximum size of the log file. The default is 2MB. When the file size is larger than 2MB, the server backs up and empties the log file, such as iserverOperation.Log. Backup sequentially as iserver.log.1, iserver.log.2……. |
File log level: |
There is only one level of operation logs information: information. It is grayed out here. The default level is information. For specific level description, see Table 2 Explanation of Operation Log Information Level. |
The "Log/Distributed Analysis Logs" tab allows you to configure the SuperMap iServer distributed analysis logs, See Table 6 Explanation of Distributed Analysis Log Configuration Parameters for the description. After the configuration is completed, click Save button to save.
Table 6 Explanation of Distributed Analysis Log Configuration Parameters
Parameter | Explain |
File path: |
The full path or relative path (relative to the bin directory) used to store log files. Note the include file name. The distributed analysis logs defaults to./logs/distributeanalysis. Log. That is, %SuperMap iServer_HOME%/logs/distributeanalysis.log. |
Max file size: |
The file size limits the maximum size of the log file. The default is 1MB. When the file size is larger than 1MB, the server backs up the log file, such as distributeanalysis.log. Backup sequentially as iserver.log.1, iserver.log.2……. |
File log level: |
There is only one level of operation logs information: information. It is grayed out here. The default level is information. See Table 3Explanation of Distributed Analysis Log Information Level. |
The "Log/Service Access Logs" tab allows you to configure the SuperMap iServer service access logs, Please refer to Table 7 Explanation of Service Access Logs Configuration Parameters for the description. After the configuration is completed, click Save button to save. The service access logs file is stored by default as: %SuperMap iServer_HOME%/logs/iServerHTTPArchive.har.
Table 7 Explanation of Service Access Logs Configuration Parameters
Parameter | Explain |
Enable |
The SuperMap iServer server does not enable service access logs by default, and the user needs to enable it manually, that is, check the box on the right. |
Log file name |
The file name of the output service access logs. The default name is iServerHTTPArchive, which supports user customization. |
Service URL |
The service URL address of the SuperMap iServer to be monitored, which supports wildcards * and? (Where * represents zero or more arbitrary characters, and ? represents a single arbitrary character), and supports adding multiple monitored services URL address, multiple services can be monitored at the same time. For the complete composition of the service URL address, see URI Settings . Hint:
|
Added |
The URL address of the added monitoring service begins with "/services" by default. |
The service access logs can also be configured through the XML config file (see: iServer Config File Description), add the following configuration information in the iserver-system.xml:
<harLog> <enabled>false</enabled> <name>iServerHTTPArchive</name> <monitorURLs/> </harLog>
<enabled>: Set whether to enable service access logs. The default value is false.
<name>: The file name of the output service access log is iServerHTTPArchive by default and supports user customization.
<monitorURLs>: The service URL address of SuperMap iServer that needs to be monitored.
When the iServer service is started, the background will check the network dataset and the steering table, and throw a warning for the network data. If the traffic network analysis function is required, the network data should be adjusted according to the warning log to ensure the correctness of the network analysis function.
For example, after starting the iServer service, the console reports the following warning:
The network dataset can be modified according to the warning information to ensure that the traffic network analysis function is available.
iServer supports permission settings for rolling log files. For example, if you want to set read-only permissions on a iServer system logs, you can add the following settings to the iserver-log4j.properties file:
log4j.appender.FFilter.RolloverStrategy.PosixViewAttribute.basePath=../logs/
log4j.appender.FFilter.RolloverStrategy.PosixViewAttribute.filePermissions=rwxr-----
log4j.appender.FFilter.RolloverStrategy.PosixViewAttribute.IfFileName.glob=iserver.log.*