added Error logs page

zadam 2022-12-14 12:20:44 +01:00
parent c52abc1ef0
commit 7621392040
7 changed files with 58 additions and 31 deletions

19
Anonymized database.md Normal file

@ -0,0 +1,19 @@
### Anonymized database
In some cases, it's necessary to see the database structure to be able to debug the problem. Of course, we can't ask you to send us your [[document|Document]] file with your notes.
For this, Trilium supports anonymization of the database - you can trigger this in Options -> Advanced tab.
[[images/anonymization.png]]
This will create a copy of your document and remove all sensitive data (currently note titles, contents, revisions, history and some of the options, and non-system attributes) while leaving all structure and metadata (e.g. date of last change). After this is done, the database is [VACUUMed](https://sqlite.org/lang_vacuum.html) to make sure there's no stale sensitive data in the document file. The resulting file is stored in `anonymized` directory (placed in the [[data directory]]). You can safely attach it with your bug report or send it to zadam.apps@gmail.com
#### Command line anonymization
If the database is corrupted in a way which prevents Trilium to start up, you won't be able to trigger the anonymization from the UI. For such a case, anonymization is also available from command line:
```
node src/anonymize.js
```
This needs to be executed in the directory with Trilium source files, for desktop builds this in `resources/app` directory.

38
Error logs.md Normal file

@ -0,0 +1,38 @@
It's important to provide all available error logs together with bug reports. This page will show you how to do it.
## Backend logs
Open [[data directory]], 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 `CTRL-SHIFT-I` which should work in most browsers (and desktop app).
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:
[[images/error-logs-firefox-context-menu.png]]
Once you have Dev Tools open, click on "Console" tab:
[[images/error-logs-dev-tools.png]]
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.
## Providing sensitive data
If you don't feel comfortable attaching the logs or anything sensitive to the public GitHub issues, feel free to mail them to zadam.apps@gmail.com
Use this email to also provide anything which could assist in analysing the bug - e.g. files/images/ZIPs being imported or [[anonymized database]].
### Exporting note subtree for reproduction
Often times, bugs manifest themselves in specific notes and having them would greatly ease reproduction and fixing.
In such case, please export the relevant note subtree by right-clicking it on the left tree, choosing Export - HTML as ZIP:
[[images/error-logs-export-subtree.png]]

@ -73,34 +73,4 @@ It's a great help to send bug reports. Here are some tips where to look at:
Trilium uses GitHub issues - so please send your reports here: https://github.com/zadam/trilium/issues
**To be clear, the following are not required for each and every bug report, but may be asked for on per-issue basis.**
### Browser console
If Trilium UI is acting up, open developer console by pressing `CTRL-SHIFT-I`, there might be some relevant errors or warnings.
All JavaScript errors should be also logged to backend logs, but it's possible something was missed.
### Backend logs
Trilium logs important events and errors into `logs` directory (inside [[data directory]]). These logs are very helpful in debugging problems, so please attach the latest ones with your bug report. You don't have to worry, they don't contain any sensitive information about your notes.
### Anonymized database
In some cases, it's necessary to see the database structure to be able to debug the problem. Of course, we can't ask you to send us your [[document|Document]] file with your notes.
For this, Trilium supports anonymization of the database - you can trigger this in Options -> Advanced tab.
![image](https://user-images.githubusercontent.com/617641/148821689-52a0aeb6-e61d-4f9b-880d-c1696e9d2429.png)
This will create a copy of your document and remove all sensitive data (currently note titles, contents, revisions, history and some of the options, and non-system attributes) while leaving all structure and metadata (e.g. date of last change). After this is done, the database is [VACUUMed](https://sqlite.org/lang_vacuum.html) to make sure there's no stale sensitive data in the document file. The resulting file is stored in `anonymized` directory (placed in the [[data directory]]). You can safely attach it with your bug report or send it to zadam.apps@gmail.com
#### Command line anonymization
If the database is corrupted in a way which prevents Trilium to start up, you won't be able to trigger the anonymization from the UI. For such a case, anonymization is also available from command line:
```
node src/anonymize.js
```
This needs to be executed in the directory with Trilium source files, for desktop builds this in `resources/app` directory.
Check [[error logs]] page for info how to provide the necessary info.

BIN
images/anonymization.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB