Skip to content

Commit 63258fe

Browse files
committed
Improve jq query to only show app's log
1 parent ce25a41 commit 63258fe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,10 @@ by default */var/www/nextcloud/data/nextcloud.log* or */var/log/syslog*. Log le
117117
* if not installed: `apt install jq`
118118
* watch logfile starting at the bottom:
119119
```bash
120-
jq -C . nextcloud.log | less -R +G
120+
jq -C 'select (.app=="user_backend_sql_raw")' /var/www/nextcloud/data/nextcloud.log | less -R +G
121121
```
122-
123-
* `-C` enables colored output, later `-R` keeps it
122+
* `-C` enables colored output, later for *less* `-R` keeps it
123+
* the `select` defines a filter to only show entries where the key `app` is set to this app's name
124124
* `+G` jumps to end of file
125-
* don't forget the single period `.` after `-C` it's not a typo and means "don't filter anything"
126125
* *less* does not auto-update, you need to quit using <kbd>q</kbd> and start again
127126
- This app also logs non-SQL configuration errors, e.g. missing db name.

0 commit comments

Comments
 (0)