diff --git a/README.md b/README.md index f40bcae1..e1d1f64f 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ read logs from any directory. - ๐Ÿ“‚ **View all the Monolog logs** in your `%kernel.logs_dir%` directory, - ๐Ÿ” **Search** the logs, -- ๐ŸŽš **Filter** by log level (error, info, debug, etc.), or by channel. +- ๐ŸŽš **Filter** by log level (error, info, debug, etc.), by channel, date range or log content, - ๐ŸŒ‘ **Dark mode**, - ๐Ÿ’พ **Download** or **delete** log files from the UI, - โ˜Ž๏ธ **API access** for folders, files & log entries, diff --git a/docs/advanced-search-queries.md b/docs/advanced-search-queries.md index bac4149f..9f2a531f 100644 --- a/docs/advanced-search-queries.md +++ b/docs/advanced-search-queries.md @@ -6,21 +6,24 @@ The search query allows for more fine-grained control over the search results. T |--------------------------------------|-------|---------------------------------------------------------------------------------| | `before:`,`before:""` | `b` | Show all logs messages that occur before the specified date. | | `after:`,`after:""` | `a` | Show all logs messages that occur after the specified date. | +| `severity:` | `s` | Show all logs messages that match the given severity/severities. | +| `channel:` | `c` | Show all logs messages that match the given channel(s). | +| `after:`,`after:""` | `a` | Show all logs messages that occur after the specified date. | | `exclude:`,`exclude:""` | `-` | Exclude the specific sentence from the results. Can be specified multiple times | ## Example -Search all log entries between `2020-01-01` and `2020-01-31`, excluding all entries that contain the word `"Controller"` and must -include `"Exception"`. +Search all log entries between `2020-01-01` and `2020-01-31`, for severity `warning` or `error`, in channel `app` +excluding all entries that contain the word `"Controller"` and must include `"Exception"`. ```text -before:2020-01-31 after:2020-01-01 exclude:Controller "Failed to read" +before:2020-01-31 after:2020-01-01 severity:warning|error channel:app exclude:Controller "Failed to read" ``` ### In shorthand ```text -b:2020-01-31 a:2020-01-01 -:Controller "Failed to read" +b:2020-01-31 a:2020-01-01 s:warning|error c:app -:Controller "Failed to read" ``` ### Multiple exclusions diff --git a/frontend/src/components/LogFile.vue b/frontend/src/components/LogFile.vue index 2ece7275..8be36da1 100644 --- a/frontend/src/components/LogFile.vue +++ b/frontend/src/components/LogFile.vue @@ -2,6 +2,7 @@ import ButtonGroup from '@/components/ButtonGroup.vue'; import type LogFile from '@/models/LogFile'; import bus from '@/services/EventBus'; +import {useSearchStore} from '@/stores/search'; import axios from 'axios'; import {ref, watch} from 'vue'; import {useRoute, useRouter} from 'vue-router'; @@ -14,6 +15,7 @@ const toggleRef = ref(); const selectedFile = ref(null); const route = useRoute(); const router = useRouter(); +const searchStore = useSearchStore(); const baseUri = axios.defaults.baseURL; const deleteFile = (identifier: string) => { axios.delete('/api/file/' + encodeURI(identifier)) @@ -32,7 +34,7 @@ watch(() => route.query.file, () => selectedFile.value = String(route.query.file