Skip to content

I want to check the Pleasanter log

Answer

  1. Use "System Log Management".
  2. Execute SQL.

Overview

These are the steps to check and obtain Pleasanter's "System Log Management".

Notes

  1. If you are directly manipulating the database to obtain logs, we strongly recommend that you obtain a "Backup" beforehand.

Operation Procedure (System Log Management Function)

Parameter Change

Since the System Log Management function can only be used by privileged users, edit the parameter settings.
1. Open App_Data/Parameters/Security.json.
1. Specify the privileged user (login ID) in the "PrivilegedUsers" parameter and save it. Please refer to the following manual for how to specify parameters.
Parameter settings:Security.json
1. Restart Pleasanter.

Log Acquisition

  1. Log in to Pleasanter as a privileged user.
  2. Open the "Management" menu and click "System Log Management".
  3. Set the conditions in the filter and click the "Filter "button.
  4. Verify that records (logs) are displayed according to the set conditions.
  5. Click the "Export" button at the bottom of the screen.

Operation Procedure (SQL Server)

  1. Log in to the server where Pleasanter is installed.
  2. Start SSMS (SQL Server Management Studio).
  3. From "Object Explorer", expand "Databases" and select "Implem.Pleasanter".
  4. Right-click "Implem.Pleasanter" and click "New Query".
  5. Execute the following SQL to retrieve data from the "SysLogs Table".

To get the most recent 1000 items

select top 1000 * from "SysLogs" order by "CreatedTime" desc;

To get logs for a specific period

select * from "SysLogs" where "CreatedTime" between '2021/07/01 00:00:00' and '2021/07/02 00:00:00'
  1. Click the top left of the results window to select all results.
  2. Right-click the above selection and click "Save Results As".
  3. Save the output results (CSV).

Operation Procedure (PostgreSQL)

① Log acquisition using PSQL

  1. Log in to the server where Pleasanter is installed.
  2. Switch to the postgres user.
    su - postgres
    
  3. Execute the following psql command to get the data of the SysLogs Table.

To get the most recent 1000 records

psql -d "Implem.Pleasanter" -U postgres -c "select * from \"SysLogs\" order by \"CreatedTime\" desc limit 1000;" -A -F, > /web/syslogs.csv

To get logs for a specific period

psql -d "Implem.Pleasanter" -U postgres -c "select * from \"SysLogs\" where \"CreatedTime\" between '2022/02/08 00:00:00' and '2022/02/09 00:00:00' order by \"CreatedTime\" desc;" -A -F, > /web/syslogs.csv

1. Save the CSV output to /web/syslogs.csv.

② Log acquisition using pgAdmin

  1. Start pgAdmin.
  2. Connect to the Pleasanter database.
  3. In Object Explorer, right-click "Server name > Database > Implem.Pleasanter" and click "Query Tool".
    Opening the Query Tool from Object Explorer in pgAdmin
  4. Execute the following SQL.

To get the most recent 1000 items

select * from "Implem.Pleasanter"."SysLogs" order by "CreatedTime" desc limit 1000;

To get logs for a specific period

select * from "Implem.Pleasanter"."SysLogs" where "CreatedTime" between '2022/02/08 00:00:00' and '2022/02/09 00:00:00' order by "CreatedTime" desc limit 1000;

1. Click the red frame in the data output in the image below and save the output results (CSV).
Data output in pgAdmin, with the button for saving the CSV marked by a red frame

Log Contents

For the contents of the "SysLogs Table", please refer to FAQ: About the contents of the operation log (SysLogs table).