Merge pull request #975 from gtankovics/master

jq log - handling non json lines as raw with red color
mine
Fernand Galiana 2020-12-01 18:20:30 -07:00 committed by GitHub
commit 0a57bf4256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,3 +1,3 @@
#!/bin/bash
/usr/local/bin/kubectl logs -f $1 -n $2 --context $3 | jq -r '.message'
/usr/local/bin/kubectl logs -f $1 -n $2 --context $3 | jq -rR '. as $raw | try (fromjson | .message) catch ("\u001b[31m" + $raw + "\u001b[0m")'