mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 15:56:29 +01:00
docs(help): document backend logs retention
This commit is contained in:
156
docs/User Guide/!!!meta.json
vendored
156
docs/User Guide/!!!meta.json
vendored
@@ -4841,31 +4841,38 @@
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "wy8So3yZZlH9",
|
||||
"value": "eIg8jdvaoNNd",
|
||||
"isInheritable": false,
|
||||
"position": 50
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "CdNpE2pqjmI6",
|
||||
"value": "wy8So3yZZlH9",
|
||||
"isInheritable": false,
|
||||
"position": 60
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "tAassRL4RSQL",
|
||||
"value": "CdNpE2pqjmI6",
|
||||
"isInheritable": false,
|
||||
"position": 70
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "cbkrhQjrkKrh",
|
||||
"value": "tAassRL4RSQL",
|
||||
"isInheritable": false,
|
||||
"position": 80
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "cbkrhQjrkKrh",
|
||||
"isInheritable": false,
|
||||
"position": 90
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "shareAlias",
|
||||
@@ -9131,13 +9138,6 @@
|
||||
"type": "text",
|
||||
"mime": "text/markdown",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "tAassRL4RSQL",
|
||||
"isInheritable": false,
|
||||
"position": 10
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
@@ -9151,27 +9151,32 @@
|
||||
"value": "error-logs",
|
||||
"isInheritable": false,
|
||||
"position": 30
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "bnyigUA2UK7s",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "9yEHzMyFirZR",
|
||||
"isInheritable": false,
|
||||
"position": 50
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "iconClass",
|
||||
"value": "bx bx-comment-error",
|
||||
"isInheritable": false,
|
||||
"position": 60
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
"dataFileName": "Error logs.md",
|
||||
"attachments": [
|
||||
{
|
||||
"attachmentId": "8b6d0LUU1aMl",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/jpg",
|
||||
"position": 10,
|
||||
"dataFileName": "Error logs_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "krunYsa4JeyV",
|
||||
"title": "error-logs-firefox-context-men.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "Error logs_error-logs-fire.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "ReQzLPod6UtU",
|
||||
"title": "error-logs-export-subtree.png",
|
||||
@@ -9180,6 +9185,103 @@
|
||||
"position": 10,
|
||||
"dataFileName": "Error logs_error-logs-expo.png"
|
||||
}
|
||||
],
|
||||
"dirFileName": "Error logs",
|
||||
"children": [
|
||||
{
|
||||
"isClone": false,
|
||||
"noteId": "bnyigUA2UK7s",
|
||||
"notePath": [
|
||||
"pOsGYCXsbNQG",
|
||||
"BgmBlOIl72jZ",
|
||||
"qzNzp9LYQyPT",
|
||||
"bnyigUA2UK7s"
|
||||
],
|
||||
"title": "Backend (server) logs",
|
||||
"notePosition": 10,
|
||||
"prefix": null,
|
||||
"isExpanded": false,
|
||||
"type": "text",
|
||||
"mime": "text/html",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "tAassRL4RSQL",
|
||||
"isInheritable": false,
|
||||
"position": 10
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "x3i7MxGccDuM",
|
||||
"isInheritable": false,
|
||||
"position": 20
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "Gzjqa934BdH4",
|
||||
"isInheritable": false,
|
||||
"position": 30
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "iconClass",
|
||||
"value": "bx bx-server",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
"dataFileName": "Backend (server) logs.md",
|
||||
"attachments": []
|
||||
},
|
||||
{
|
||||
"isClone": false,
|
||||
"noteId": "9yEHzMyFirZR",
|
||||
"notePath": [
|
||||
"pOsGYCXsbNQG",
|
||||
"BgmBlOIl72jZ",
|
||||
"qzNzp9LYQyPT",
|
||||
"9yEHzMyFirZR"
|
||||
],
|
||||
"title": "Frontend logs",
|
||||
"notePosition": 20,
|
||||
"prefix": null,
|
||||
"isExpanded": false,
|
||||
"type": "text",
|
||||
"mime": "text/html",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "label",
|
||||
"name": "iconClass",
|
||||
"value": "bx bx-window-alt",
|
||||
"isInheritable": false,
|
||||
"position": 10
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
"dataFileName": "Frontend logs.md",
|
||||
"attachments": [
|
||||
{
|
||||
"attachmentId": "vRup2YTDpWPM",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/jpg",
|
||||
"position": 10,
|
||||
"dataFileName": "Frontend logs_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "Y05WqmS4uMMt",
|
||||
"title": "error-logs-firefox-context-men.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "Frontend logs_error-logs-f.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -19,34 +19,41 @@ Based on the <a class="reference-link" href="../UI%20Elements/Vertical%20and%20h
|
||||
Quick search includes the following features:
|
||||
|
||||
### Content Previews
|
||||
|
||||
Search results now display a 200-character preview of the note content below the note title. This preview shows the context where your search terms appear, making it easier to identify the right note without opening it.
|
||||
|
||||
### Infinite Scrolling
|
||||
|
||||
Results are loaded progressively as you scroll:
|
||||
- Initial display shows 15 results
|
||||
- Scrolling near the bottom automatically loads 10 more results
|
||||
- Continue scrolling to load all matching notes
|
||||
|
||||
* Initial display shows 15 results
|
||||
* Scrolling near the bottom automatically loads 10 more results
|
||||
* Continue scrolling to load all matching notes
|
||||
|
||||
### Visual Features
|
||||
- **Highlighting**: Search terms appear in bold with accent colors
|
||||
- **Separation**: Results are separated with dividers
|
||||
- **Theme Support**: Highlighting colors adapt to light/dark themes
|
||||
|
||||
* **Highlighting**: Search terms appear in bold with accent colors
|
||||
* **Separation**: Results are separated with dividers
|
||||
* **Theme Support**: Highlighting colors adapt to light/dark themes
|
||||
|
||||
### Search Behavior
|
||||
|
||||
Quick search uses progressive search:
|
||||
1. Shows exact matches first
|
||||
2. Includes fuzzy matches when exact results are fewer than 5
|
||||
3. Exact matches appear before fuzzy matches
|
||||
|
||||
1. Shows exact matches first
|
||||
2. Includes fuzzy matches when exact results are fewer than 5
|
||||
3. Exact matches appear before fuzzy matches
|
||||
|
||||
### Keyboard Navigation
|
||||
- Press `Enter` to open the first result
|
||||
- Use arrow keys to navigate through results
|
||||
- Press `Escape` to close the quick search
|
||||
|
||||
* Press `Enter` to open the first result
|
||||
* Use arrow keys to navigate through results
|
||||
* Press `Escape` to close the quick search
|
||||
|
||||
## Using Quick Search
|
||||
|
||||
1. **Typo tolerance**: Search finds results despite minor typos
|
||||
2. **Content previews**: 200-character snippets show match context
|
||||
3. **Infinite scrolling**: Additional results load on scroll
|
||||
4. **Specific terms**: Specific search terms return more focused results
|
||||
5. **Match locations**: Bold text indicates where matches occur
|
||||
1. **Typo tolerance**: Search finds results despite minor typos
|
||||
2. **Content previews**: 200-character snippets show match context
|
||||
3. **Infinite scrolling**: Additional results load on scroll
|
||||
4. **Specific terms**: Specific search terms return more focused results
|
||||
5. **Match locations**: Bold text indicates where matches occur
|
||||
@@ -80,10 +80,11 @@ Trilium supports fuzzy search operators that find results with typos or spelling
|
||||
* `note.content ~* develpment`: Will find notes containing "development" despite the typo
|
||||
|
||||
**Important notes about fuzzy search:**
|
||||
- Fuzzy search requires at least 3 characters in the search term
|
||||
- Maximum edit distance is 2 characters (number of character changes needed)
|
||||
- Diacritics are normalized (e.g., "café" matches "cafe")
|
||||
- Fuzzy matches work best for finding content with minor typos or spelling variations
|
||||
|
||||
* Fuzzy search requires at least 3 characters in the search term
|
||||
* Maximum edit distance is 2 characters (number of character changes needed)
|
||||
* Diacritics are normalized (e.g., "café" matches "cafe")
|
||||
* Fuzzy matches work best for finding content with minor typos or spelling variations
|
||||
|
||||
### Advanced Use Cases
|
||||
|
||||
@@ -137,25 +138,24 @@ Trilium uses a progressive search strategy that performs exact matching first, t
|
||||
|
||||
### How Progressive Search Works
|
||||
|
||||
1. **Phase 1 - Exact Matching**: When you search, Trilium first looks for exact matches of your search terms. This handles the vast majority of searches (90%+) and returns results almost instantly.
|
||||
|
||||
2. **Phase 2 - Fuzzy Fallback**: If Phase 1 doesn't find enough high-quality results (fewer than 5 results with good relevance scores), Trilium automatically adds fuzzy matching to find results with typos or spelling variations.
|
||||
|
||||
3. **Result Ordering**: Exact matches always appear before fuzzy matches, regardless of individual scores. This ensures that when you search for "project", notes containing the exact word "project" will appear before notes containing similar words like "projects" or "projection".
|
||||
1. **Phase 1 - Exact Matching**: When you search, Trilium first looks for exact matches of your search terms. This handles the vast majority of searches (90%+) and returns results almost instantly.
|
||||
2. **Phase 2 - Fuzzy Fallback**: If Phase 1 doesn't find enough high-quality results (fewer than 5 results with good relevance scores), Trilium automatically adds fuzzy matching to find results with typos or spelling variations.
|
||||
3. **Result Ordering**: Exact matches always appear before fuzzy matches, regardless of individual scores. This ensures that when you search for "project", notes containing the exact word "project" will appear before notes containing similar words like "projects" or "projection".
|
||||
|
||||
### Progressive Search Behavior
|
||||
|
||||
- **Speed**: Most searches complete using only exact matching
|
||||
- **Ordering**: Exact matches appear before fuzzy matches
|
||||
- **Fallback**: Fuzzy matching activates when exact matches return fewer than 5 results
|
||||
- **Identification**: Results indicate whether they are exact or fuzzy matches
|
||||
* **Speed**: Most searches complete using only exact matching
|
||||
* **Ordering**: Exact matches appear before fuzzy matches
|
||||
* **Fallback**: Fuzzy matching activates when exact matches return fewer than 5 results
|
||||
* **Identification**: Results indicate whether they are exact or fuzzy matches
|
||||
|
||||
### Search Performance
|
||||
|
||||
Search system specifications:
|
||||
- Content size limit: 10MB per note (previously 50KB)
|
||||
- Edit distance calculations for fuzzy matching
|
||||
- Infinite scrolling in Quick Search
|
||||
|
||||
* Content size limit: 10MB per note (previously 50KB)
|
||||
* Edit distance calculations for fuzzy matching
|
||||
* Infinite scrolling in Quick Search
|
||||
|
||||
## Under the Hood
|
||||
|
||||
@@ -228,14 +228,14 @@ You can open Trilium and automatically trigger a search by including the search
|
||||
### Parameters
|
||||
|
||||
| Parameter | Value | Description |
|
||||
|-----------|-------|-------------|
|
||||
| MIN_FUZZY_TOKEN_LENGTH | 3 | Minimum characters for fuzzy matching |
|
||||
| MAX_EDIT_DISTANCE | 2 | Maximum character changes allowed |
|
||||
| RESULT_SUFFICIENCY_THRESHOLD | 5 | Minimum exact results before fuzzy fallback |
|
||||
| MAX_CONTENT_SIZE | 10MB | Maximum note content size for search processing |
|
||||
| --- | --- | --- |
|
||||
| MIN\_FUZZY\_TOKEN\_LENGTH | 3 | Minimum characters for fuzzy matching |
|
||||
| MAX\_EDIT\_DISTANCE | 2 | Maximum character changes allowed |
|
||||
| RESULT\_SUFFICIENCY\_THRESHOLD | 5 | Minimum exact results before fuzzy fallback |
|
||||
| MAX\_CONTENT\_SIZE | 10MB | Maximum note content size for search processing |
|
||||
|
||||
### Limits
|
||||
|
||||
* Searched note content is limited to 10MB per note to prevent performance issues
|
||||
* Notes exceeding this limit will still be included in title and attribute searches
|
||||
* Fuzzy matching requires tokens of at least 3 characters
|
||||
* Searched note content is limited to 10MB per note to prevent performance issues
|
||||
* Notes exceeding this limit will still be included in title and attribute searches
|
||||
* Fuzzy matching requires tokens of at least 3 characters
|
||||
13
docs/User Guide/User Guide/FAQ.md
vendored
13
docs/User Guide/User Guide/FAQ.md
vendored
@@ -65,8 +65,9 @@ Trilium uses a progressive search strategy that includes fuzzy matching when exa
|
||||
### How can I search for notes when I'm not sure of the exact spelling?
|
||||
|
||||
Use the fuzzy search operators:
|
||||
- `#title ~= "projct"` - finds notes with titles like "project" despite the typo
|
||||
- `note.content ~* "algoritm"` - finds content containing "algorithm" or similar words
|
||||
|
||||
* `#title ~= "projct"` - finds notes with titles like "project" despite the typo
|
||||
* `note.content ~* "algoritm"` - finds content containing "algorithm" or similar words
|
||||
|
||||
### Why do some search results appear before others with lower scores?
|
||||
|
||||
@@ -74,7 +75,7 @@ Trilium places exact matches before fuzzy matches. When you search for "project"
|
||||
|
||||
### How can I make my searches faster?
|
||||
|
||||
1. Use the "Fast search" option to search only titles and attributes (not content)
|
||||
2. Limit search scope using the "Ancestor" field
|
||||
3. Set a result limit to prevent loading too many results
|
||||
4. For large databases, consider archiving old notes to reduce search scope
|
||||
1. Use the "Fast search" option to search only titles and attributes (not content)
|
||||
2. Limit search scope using the "Ancestor" field
|
||||
3. Set a result limit to prevent loading too many results
|
||||
4. For large databases, consider archiving old notes to reduce search scope
|
||||
@@ -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