mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 07:09:54 +01:00
docs(help): document backend logs retention
This commit is contained in:
@@ -1,28 +1,10 @@
|
||||
# Error logs
|
||||
It's important to provide all available error logs together with bug reports. This page will show you how to do it.
|
||||
It's important to provide all available error logs together with bug reports.
|
||||
|
||||
## Backend logs
|
||||
There are two types of error logs, both of which are useful when reporting bugs.
|
||||
|
||||
Open [data directory](../Installation%20%26%20Setup/Data%20directory.md), go to `log` subdirectory and find the latest log file, e.g. `trilium-2022-12-14.log`. You can attach the whole file to the bug report (preferable) or open it and copy-paste only the last lines / lines you believe are relevant.
|
||||
|
||||
If you have trouble finding it the log files, there's also an in-app option in top-left menu button -> Advanced -> Show backend log.
|
||||
|
||||
## Frontend logs
|
||||
|
||||
To provide frontend logs, we need to open the Developer Console. Often the easiest way is to press <kbd>Ctrl</kbd>\-<kbd>Shift</kbd>\-<kbd>I</kbd> which should work in most browsers (and desktop app). Make sure that the error producing action happened right before you copy&paste the errors, the console is cleared on app restart.
|
||||
|
||||
If that doesn't work, then:
|
||||
|
||||
* in Trilium desktop app, go to top-left menu button -> Advanced -> Open Dev Tools
|
||||
* In Firefox/Chrome right-click anywhere in the page and click Inspect:
|
||||
|
||||

|
||||
|
||||
Once you have Dev Tools open, click on "Console" tab:
|
||||
|
||||

|
||||
|
||||
Copy-paste (or screenshot) the logs. It's better to provide not just errors, but the whole log, which might provide context while analyzing the bug.
|
||||
* <a class="reference-link" href="Error%20logs/Backend%20(server)%20logs.md">Backend (server) logs</a>
|
||||
* <a class="reference-link" href="Error%20logs/Frontend%20logs.md">Frontend logs</a>
|
||||
|
||||
## Providing sensitive data
|
||||
|
||||
|
||||
28
docs/User Guide/User Guide/Troubleshooting/Error logs/Backend (server) logs.md
vendored
Normal file
28
docs/User Guide/User Guide/Troubleshooting/Error logs/Backend (server) logs.md
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Backend (server) logs
|
||||
## Accessing via the backend log
|
||||
|
||||
In the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a>, go to Advanced → Show backend log
|
||||
|
||||
## Location on the disk
|
||||
|
||||
Backend logs are stored on the file system. To find them, open the <a class="reference-link" href="../../Installation%20%26%20Setup/Data%20directory.md">Data directory</a>, go to the `log` subdirectory and find the latest log file, e.g. `trilium-2022-12-14.log`.
|
||||
|
||||
## Reporting backend bugs
|
||||
|
||||
You can attach the whole file to the bug report (preferable) or open it and copy-paste only the last lines / lines you believe are relevant.
|
||||
|
||||
## Customizing the retention of logs
|
||||
|
||||
The backend logs are fully managed by the Trilium server. By default the last 90 days worth of logs are kept; the logs older than that are deleted in order to reduce the space consumption.
|
||||
|
||||
It's possible to change the retention period by modifying the <a class="reference-link" href="../../Advanced%20Usage/Configuration%20(config.ini%20or%20e.md">Configuration (config.ini or environment variables)</a> via the `.ini` file:
|
||||
|
||||
```
|
||||
[Logging]
|
||||
retentionDays=7
|
||||
```
|
||||
|
||||
Or via the environment variable `TRILIUM_LOGGING_RETENTION_DAYS`.
|
||||
|
||||
> [!NOTE]
|
||||
> If you set the retention days to a low number, you might notice that not all the log files are being deleted. This is because a minimum number of logs (7 at the time of writing) is maintained at all times.
|
||||
15
docs/User Guide/User Guide/Troubleshooting/Error logs/Frontend logs.md
vendored
Normal file
15
docs/User Guide/User Guide/Troubleshooting/Error logs/Frontend logs.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Frontend logs
|
||||
To provide frontend logs, we need to open the Developer Console. Often the easiest way is to press <kbd>Ctrl</kbd>\-<kbd>Shift</kbd>\-<kbd>I</kbd> which should work in most browsers (and desktop app). Make sure that the error producing action happened right before you copy&paste the errors, the console is cleared on app restart.
|
||||
|
||||
If that doesn't work, then:
|
||||
|
||||
* in Trilium desktop app, go to top-left menu button -> Advanced -> Open Dev Tools
|
||||
* In Firefox/Chrome right-click anywhere in the page and click Inspect:
|
||||
|
||||

|
||||
|
||||
Once you have Dev Tools open, click on "Console" tab:
|
||||
|
||||

|
||||
|
||||
Copy-paste (or screenshot) the logs. It's better to provide not just errors, but the whole log, which might provide context while analyzing the bug.
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
Reference in New Issue
Block a user