I. Overview
1) The log feature enabled on the platform is designed to enhance control over report projects and help to monitor running status.
2) LogDB is a built-in database, aiming to store log files after enabling the log feature.
Note: Platform log settings are applicable to system logs only. Operational logs are not affected.
II. Connect to and Use LogDB
1. Connect to LogDB
1) Click Server -> Define Data Connection to add a JDBC connection and rename it to "logdb".
2) The settings are as follows:
Select Others for Database
For Driver, enter "com.fr.swift.jdbc.Driver"
For URL, enter "jdbc:swift:emb://default"
For Username and Password, leave them blank
Note: It is essential to enforce control over data connections after adding the connection to the LogDB, otherwise the configurations stored in the database are exposed to the risks of unauthorized access and tampering.
2. View Data Table
Add a DB query with the defined data connection "logdb" to list out all the data tables in the database.
3. Query Statement
Please see below for statements supported by LogDB for the time being:
1) SELECT
Examples:
select * from fine_record_execute
select tname, displayName, consume from fine_record_execute
2) GROUP BY
SUM, COUNT, MAX, MIN and AVERAGE are supported with COUNT as the default method.
Examples:
select sum(consume) from fine_record_execute group by tname, displayName
select consume from fine_record_execute group by tname, displayName
select min(consume), max(consume) from fine_record_execute group by tname, displayName
3) WHERE
Simple WHERE statements, including AND, OR, =, <>, >, >=, <, <=, in and isnull are supported
Examples:
select * from fine_record_execute where consume > 10
select sum(consume) from fine_record_execute where consume > 10 and consume < 100 group by tname, displayName
select consume from fine_record_execute where tname = `GettingStartedEN.cpt`
select sum(consume) from fine_record_execute where tname in (`GettingStartedEN.cpt`, `demoEN/WorkBook1.cpt`) group by tname, displayName
4) TODATE()
for Converting Timestamp to Regular Dates
The format of returned value of TODATE() is "2018-12-18 10:15:26"
Examples:
select todate(time) from fine_record_execute
select * from fine_record_execute where todate(time)<'2018-12-18 10:15:26' and todate(time)>'2018-12-17 10:15:26'
Note: It is supported on JARs released on and after 20th May, 2019.
5) LIKE
Only supports using "%keyword%"
Note:
NOT LIKE is not supported.
Only '%' is supported for now. Wildcard character '_' needs JARs released on and after 20th May, 2019.
Examples:
select * from fine_record_execute where tname like '%demo%'