-
-
Save mpapis/1855198 to your computer and use it in GitHub Desktop.
RLA wrapper
This file contains 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/env bash | |
if (( $# < 2 )) | |
then | |
echo "ERROR: This script expects at least two arguments" >&2 | |
exit 1 | |
fi | |
RLA_DATE_FMT="%Y-%m-%d %H:%M:%S" | |
infile=$1 | |
after="$(date -d "$2" "+$RLA_DATE_FMT")" | |
before="$(date -d "$2 + 1 day" "+$RLA_DATE_FMT")" | |
outfile="rla-$2.html" | |
cmd="request-log-analyzer --after \"${after}\" --before \"${before}\" --output html ${infile} > ${outfile}" | |
echo $cmd >&2 | |
rvm ruby-1.9.3-p0@log-examiner do $cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment