Log Introduction

  • Last update:  2021-12-07
  • I. Overview

    1. Version

    Report sever version
    Function change
    10.0-
    10.0.18
    Log Cleanup was renamed Operation Log Cleanup 


    2. Features

    When the FineReport project is running, a related log file will be generated for recording.

    Log typeLog storageLog content
    System log

    Stored in %FR_HOME%\logs\fanruan.log by default

    The designer side allows to modify the log storage location

    The server side is not allowed to modify the log storage location

    Record some information during the operation of the system
    Operation log 

    Stored in %FR_HOME%\webapps\webroot\logs\cubes

    It is not allowed to modify the log storage location

    Record usage actions of ordinary users and administrators
    Supplementary log

    Stored in %FR_HOME%\bin\error.txt

    It is not allowed to modify the log storage location

    Record unexpected errors reported by the designer

    II. System log

    The system log records some information during the operation of the system.

    1. Log level

    The system log output level is divided into five types: DEBUG, INFO, WARN, ERROR, FATAL.

    • Log level size sort (severity): FATAL>ERROR>WARN>INFO>DEBUG

    • Sort of log detail level: FATAL<ERROR<WARN<INFO<DEBUG

    Log level

    DEBUG

    Point out that fine-grained information events are very helpful for debugging applications, mainly used to print some running information during the development process.

    Output some system information logs and more detailed logs of SQL execution, which are generally used in the preliminary development and debugging templates of programmers who need secondary development.

    INFOHighlight the running process of the application at the coarse-grained level, and print some interesting or important information.

    It can be used to output some important information about program operation in the production environment, but it cannot be abused to avoid printing too many logs.

    WARNIndicates that there will be potential errors. Some messages are not error messages, but some hints to the programmer should also be given.
    ERRORPoint out that although an error event occurs, it still does not affect the continued operation of the system. Print error and exception information.

    If you don't want to output too many logs, you can use this level.

    FATAL

    Point out that every serious error event will cause the application to exit.

    This level is relatively high, it is a major error, you can stop the program directly.


    2. Designer

    The designer system log records the related logs of the designer's local project runtime.

    If the designer connects to the server project remotely, the log is not recorded in the designer log, but in the server log.

    1) Set log level & storage location

    The designer's default log level isERROR, which is stored in the %FR_HOME%\logs\fanruan.log file by default.

    Open the designer, clickFile>Options>Advanced, as shown in the figure below:

    InSelect Export Log Directory, you can modify the export log storage location. In theloglevel setting, you can adjust the log level according to your needs.

    1.png

    2) View system log

    The user can click to open the log folding box in the upper right corner of the designer, and then view the log in the pop-up box. Supports setting the log display type, supports clearing the log display interface, and supports selecting all logs for easy copying.

    The designer log viewing interface displays all logs by default, and the user can choose to display only theWarn/Errorlog, as shown in the figure below:

    Note: [Clearing/displaying] the log viewing interface will not cause the records in the log file to be deleted.

    2.png


    3. Server

    The designer system log records the related logs when the server-side project is running.

    If the designer connects to the server project remotely, the log is not recorded in the designer log, but in the server log.

    1) Set log level

    The default level of system log isERROR.

    The super administrator logs in to the data decision system, clicks Manage>Intelligent  Operation>Platform Log, clicks Global Setting, and can adjust the log level according to needs. As shown below:

    3.png

    2) Log storage location

    The report project is deployed on a server, such as a tomcat server, and the log is stored in the%FR_HOME%\logs\fanruan.log file, and the log filecatalina.out of the Tomcat server is also generated.

    It does not support modifying the server project log storage location, and does not support automatic cleaning of the %FR_HOME%\logs\fanruan.log file.

    • For customers who use the upgrade tool to upgrade or directly install the JAR package for 2019-05-20 and later versions,fanruan.log will be compressed at 0 o'clock every day to save disk space.

    • Customers who are upgrading by replacing the JAR can directly delete the log4j.properties file to realize the log file timing compression function.

    • For users who need to customize log4j configuration requirements, please refer to the document to set: fanruan.log optimization

    4.png

    III. Operation log

    1. View operation log

    Operation logs are stored in the%FR_HOME%\webapps\webroot\logs\cubesfolder by default, and the storage location is not supported.

    • The system has proactively analyzed the frequently used operation logs for you. For details, please refer to: Platform Log

    • All operation logs are stored in the cubes folder and can be queried and analyzed through data connections. For details, please refer to: Report LogDB


    2. Modify storage location

    The operation log is stored in the%FR_HOME%\webapps\webroot\logs\cubesfolder by default, and the storage location can be modified for projects of version 10.0.10 and later.

    1) Windows modify thecatalina.bat file in the%Tomcat%/bin directory, add configuration, and restart the project after the configuration is complete.

    Specify the path after the equal sign=, the relative path will automatically generate the logs folder in the bin directory, or you can use the absolute path.

    SET JAVA_OPTS="$JAVA_OPTS -DSWIFT_HOME=logs”"

    2) Linux/Unix Modify thecatalina.sh file in the%Tomcat%/bin directory, add configuration, and restart the project after the configuration is complete.

    Specify the path after the equal sign=, the relative path will automatically generate the logs folder in the bin directory, or you can use the absolute path.

    JAVA_OPTS="$JAVA_OPTS -DSWIFT_HOME=logs"


    3. Clean up operation log

    The super administrator logs in to the data decision system, clicks Manage>Intelligent  Operation>Platform Log, and clicks Global Settingto clean up the operation log files. You can setAuto cleanup andManual clean.

    1) Auto cleanup: Auto cleanup every 3 months, keeping data for nearly 3 months. It will be kept for at least 3 months, and it will actually be at most 6 months.

    2) Manual clean: The data of the last 3 months is retained by default, and you can choose 0 day, 1 day, 1 week, 1 month, 3 months, 6 months, and 12 months.

    Note 1: The [Clean operation log] setting only affects the operation log cleanup, and does not affect the system log.

    Note 2: The last 3 months refers to the data 3 months before the current date. For example, manual cleaning on August 19th, 2019, and the data from 2019-5-19 ~ 2019-8-19 are retained by default.

    Note 3: After cleaning up the log, it is found that the [cubes] folder still occupies a lot of space. The reason is that the files in the folder are only cleaned up, and the folders are not cleaned up. There are many folders in this directory and they take up a lot of space.

    Note 4: The [current log size] displayed after cleaning is not the concept of disk space, but the actual size of all files. 

    As shown below:

    5.png

    3) Clear warningWhen the log file is too large, notify the relevant user, and the relevant user can manually clean the log to reduce the size of the log file.

    Turn on the warning function and set the trigger conditions, for example, the log file is larger than xxxM.

    SMS reminders need toSMS Reminder Enable SMS function. For detailed settings, please check SMS. At the same time, email reminders also need to configure the sender. For detailed settings, please check Email.

    Then check the SMS Reminder Enable SMS function,Platform Message, andEmail Reminder Enable Email, and then set the recipients respectively, and click Save after setting, as shown in the following figure:

    6.png

    The effect of SMS reminder is shown in the figure below:

    7.png

    The effect of platform messages is shown in the figure below:

    8.png

    The effect of email reminder is shown in the figure below:

    9.png

    IV.Supplementary log

    The supplementary logs are stored in the %FR_HOME%\bin\error.txt file, and the storage location cannot be modified.

    The supplementary log mainly records errors reported unexpectedly by the designer.

    Attachment List


    Theme: Decision-making Platform
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy