Created
October 27, 2019 03:43
-
-
Save proprietary/ae0200b6402776d21ddff246e70aeba2 to your computer and use it in GitHub Desktop.
pretty print nextcloud log json line by line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Usage: nextcloud-log.sh [number of recent entries] [logfile] | |
tail -${1:-10} ${2:-/var/www/nextcloud/data/nextcloud.log} | xargs -L1 -d "\n" -I '{}' sh -c "echo '{}' | python3 -m json.tool" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment