FAQ: I want to check the Pleasanter log
## Answer
1. Use "[System Log Management](/en/manual/syslog)".
1. Execute SQL.
---
## Overview
These are the steps to check and obtain Pleasanter's "[System Log Management](/en/manual/syslog)".
## Notes
1. If you are directly manipulating the database to obtain logs, we strongly recommend that you obtain a "[Backup](/en/manual/faq-backup-and-restore)" 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](/manual/security-json)
1. Restart Pleasanter.
#### Log Acquisition
1. Log in to Pleasanter as a privileged user.
1. Open the "Management" menu and click "[System Log Management](/en/manual/syslog)".
1. Set the conditions in the filter and click the "[Filter](/en/manual/table-management-filter) "button.
1. Verify that records (logs) are displayed according to the set conditions.
1. Click the "[Export](/en/manual/table-record-export)" button at the bottom of the screen.
## Operation Procedure (SQL Server)
1. Log in to the server where Pleasanter is installed.
1. Start SSMS (SQL Server Management Studio).
1. From "Object Explorer", expand "Databases" and select "Implem.Pleasanter".
1. Right-click "Implem.Pleasanter" and click "New Query".
1. Execute the following SQL to retrieve data from the "[SysLogs Table](/en/manual/faq-contents-of-syslogs)".
#### 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.
1. Right-click the above selection and click "Save Results As".
1. Save the output results (CSV).
## Operation Procedure (PostgreSQL)
### ① Log acquisition using PSQL
1. Log in to the server where Pleasanter is installed.
1. Switch to the postgres user.
```
su - postgres
```
1. Execute the following psql command to get the data of the [SysLogs Table](/en/manual/faq-contents-of-syslogs).
#### 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.
1. Connect to the Pleasanter database.
1. In Object Explorer, right-click "Server name > Database > Implem.Pleasanter" and click "Query Tool".
![image](https://pleasanter.org/binaries/c4af19fd87534f92b3b3070eea07f089)
1. 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).
![image](https://pleasanter.org/binaries/e12db7bb3edc4ccba33fb617708be729)
## Log Contents
For the contents of the "[SysLogs Table](/en/manual/faq-contents-of-syslogs)", please refer to [FAQ: About the contents of the operation log (SysLogs table)](faq-contents-of-syslogs).
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/table-record-export">Table Function: Export Records</a><span>08.13.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/table-management-filter">Manage Table: Filter</a><span>10.02.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/table-management-export">Manage Table: Export</a><span>10.03.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/syslog">System Log Management Function</a><span>08.13.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/dept-import">Department Management Function: Import/Export</a><span>08.13.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/group-import">Group Management Function: Import/export</a><span>08.14.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/faq-backup-and-restore">FAQ: How to backup and restore Pleasanter's DB data</a><span>08.14.2024 up</span></li>
<li><a href="/en/manual/faq-backup-schedule">FAQ: I want to backup Pleasanter' DB data regularly (SQL Server)</a><span>08.14.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/faq-contents-of-syslogs">FAQ: About the contents of the operation log (SysLogs table)</a><span>10.01.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />