Skip to content

Instantly share code, notes, and snippets.

@arturom
Created October 8, 2015 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arturom/7ab17e4c5497bb385310 to your computer and use it in GitHub Desktop.
Save arturom/7ab17e4c5497bb385310 to your computer and use it in GitHub Desktop.
grep -Pio '(?<=Request Body \[).+?(?=\] {"file")' ./app/tmp/logs/elasticsearch-php.log | tail | php -r 'stream_set_blocking(STDIN, 0); while(($line = fgets(STDIN)) !== false) { echo json_decode($line), PHP_EOL; }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment