Note:For projects deployed on the O&M platform, if the Elasticsearch component was selected during deployment, Elasticsearch will replace Swift (LogDB) to store the logs.
If you see Elasticsearch Connection Configuration on the General page under System Management > System Setting, Elasticsearch has been enabled as log storage.
Do not follow this document to connect to the project log database. If you need to connect to the project log service, contact FineReport technical support (support@fanruan.com) for assistance.
Overview
Version
| Report Server Version |
|---|
| 11.0 |
Application Scenario
To facilitate project management and monitor its running status in real time, you can enable log recording on the platform, as shown in the following figure.
Note:The setting for System Log Level only affects system log output and does not affect operation logs. For the difference between the two log types, see Log Introduction.

Function Introduction
LogDB is the FineReport built-in database that stores logs after log monitoring is enabled.
This document provides a brief introduction to the data tables and fields in LogDB.
Connecting to the LogDB Database
Creating a Data Connection
In the designer menu bar, choose Server > Define Data Connection to add a new JDBC data connection. Rename it logdb and configure the settings as shown in the following table.
| Option | Value | Note |
|---|---|---|
| Database | Others | - |
| Driver | com.fr.swift.jdbc.Driver | Input the driver name manually. |
| URL | jdbc:swift:emb://default | The URL is compatible with Mac, Windows, and Linux. |
| User Name | Empty | - |
| Password | Empty | - |
The data connection page is shown in the following figure.
.
Viewing Data Tables
After the connection test succeeds, create a new Database Query dataset and select the data connection created above. All data tables in the log database are then displayed, as shown in the following figure.

Note:If the LogDB data connection has been added on the server, make sure to configure the Data Connection Using Permission correctly. Otherwise, the database may be accessed or modified without authorization.
LogDB Data Tables and Fields
For the description of the data tables and fields in the LogDB database, see LogDB Table Structure.
Query Syntax
Note:This section provides a brief overview of the query syntax supported by LogDB. Syntax not listed here is not guaranteed to be available.
Detail Query
SQL statement examples:
1. SELECT* FROM fine_record_execute
2. SELECT tname, displayName, consume FROM fine_record_execute
GROUP BY Query
GROUP BY queries support five aggregation functions: SUM, COUNT, MAX, MIN, and AVERAGE.
If no aggregation function is specified in the SQL statement, COUNT is used by default.
SQL statement examples:
1. SELECT SUM(consume) FROM fine_record_execute GROUP BY tname, displayName
2. SELECT consume FROM fine_record_execute GROUP BY tname, displayName
Equivalent to: SELECT COUNT(consume) FROM fine_record_execute GROUP BY tname, displayName
3. SELECT min(consume), max(consume) FROM fine_record_execute GROUP BY tname, displayName
WHERE Filter Conditions
Basic WHERE filter conditions support AND, OR, =, <>, >, >=, <, <=, in, and isnull.
Note:The syntax where 1=1 is not supported.
SQL statement examples:
1. SELECT * FROM fine_record_execute WHERE consume > 10
2. SELECT sum(consume) FROM fine_record_execute WHERE consume > 10 and consume < 100 GROUP BY tname, displayName
3. SELECT consume FROM fine_record_execute WHERE tname = `doc-EN/Chart/ChartSwitch/ChartSwitch_Button.cpt`
4. SELECT sum(consume) FROM fine_record_execute WHERE tname in (`doc-EN/Chart/ChartSwitch/ChartSwitch_Button.cpt`, `doc-EN/Chart/ChartSwitch/ChartSwitch_Carousel.cpt`) GROUP BY tname, displayName
todate(): Converting a Timestamp to a Standard Date Type
The date format returned by todate() is: 2018-12-18 10:15:26.
SQL statement examples:
1. SELECT todate(time) FROM fine_record_execute
2. SELECT* FROM fine_record_execute WHERE todate(time)<'2018-12-18 10:15:26' and todate(time)>'2018-12-17 10:15:26'
LIKE Fuzzy Query
Only leading and trailing '%' wildcards are supported.
Note:1. Fuzzy queries using LIKE are supported; however, NOT LIKE is not supported.
2. Currently, only '%' is supported. The wildcard '_' is not supported.
SQL statement examples:
1. SELECT * FROM fine_record_execute WHERE tname LIKE '%demo%'