Monitoring and Logging

12009

Overview

Monitoring in software development typically refers to the real-time or periodic observation and inspection of an application's operational status. Logging, on the other hand, consists of records generated during the application's runtime, including error logs, access logs, operation logs, etc., which detail the application's operational conditions.

A good monitoring and logging system can bring the following benefits:

  • Helps developers promptly identify and resolve issues, ensuring stable application operation.
  • Provides operational data of the application, assisting developers in understanding the application's status and performance.
  • Increases application transparency, allowing developers, operations personnel, and even users to be aware of the application's operational conditions.

Monitoring and Logging of JianghuJS

Real-time Monitoring

Real-time viewing of the application's operational status, such as CPU usage, memory usage, network traffic, etc.

  • jh-panel

Detailed Logs

Detailed logs, including error logs, access logs, operation logs, etc., help developers understand the application's operational conditions.

  • Page Logs

    // Page log collection, configured in config.env.js
    const config = {
       jianghuConfig: {
           enableHtmlErrorLogRecord: true,
           htmlErrorLogRecordInterval: 60000,
       }
    }
  • Resource Logs

    // Resource log collection, configured in config.env.js
    const config = {
       jianghuConfig: {
          enableResourceLogRecord: true,
          ignoreListOfResourceLogRecord: [ 'user.passwordLogin', 'allPage.getConstantList',
            'allPage.httpUploadByStream', 'allPage.httpUploadByBase64', 'allPage.httpDownloadByBase64' ],
          updateRequestDemoAndResponseDemo: false,
       }
    }
  • Application Logs: Log Monitoring

Log Analysis

Log analysis tools allow developers to discover application issues and improvement points through log analysis.

Alert Mechanism

When issues arise in the application, the alert mechanism can promptly notify developers, enabling them to address problems in a timely manner.