Skip to content
This repository has been archived by the owner on Aug 8, 2021. It is now read-only.

Commit

Permalink
Added script to grep logs.
Browse files Browse the repository at this point in the history
Removed unused groovelet
  • Loading branch information
rahulsom committed Apr 22, 2015
1 parent 35e9ba0 commit 5d63e34
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
17 changes: 17 additions & 0 deletions logstat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
if [ ! -f /tmp/logs.txt ]; then
~/.gradle/appengine-sdk/appengine-java-sdk-1.9.1/bin/appcfg.sh request_logs build/exploded-app /tmp/logs.txt
fi
cat /tmp/logs.txt \
| sed -e "s/.*GET//g" | sed -e "s/.*POST//g" \
| cut -d " " -f 2 | sort \
| sed -e "s/\/u\/.*/\/u\/hash/g" \
| sed -e "s/\/r\/.*/\/r\/hash/g" \
| sed -e "s/\/i\/.*/\/i\/hash/g" \
| sed -e "s/\/p\/.*/\/p\/hash/g" \
| sed -e "s/\/m\/.*/\/m\/hash/g" \
| sed -e "s/\/g\/.*/\/g\/user/g" \
| sed -e "s/\/g\?.*/\/g\?random/g" \
| sed -e "s/\/auth\/me.*/\/auth\/me/g" \
| sed -e "s/\/l\/.*/\/l\/user/g" \
| uniq -c
19 changes: 0 additions & 19 deletions src/main/webapp/WEB-INF/groovy/datastoreGroovlet.groovy

This file was deleted.

10 changes: 5 additions & 5 deletions src/main/webapp/WEB-INF/routes.groovy
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
all "/", forward: "/index.groovy"
all "/g", forward: "/random.groovy"
all "/g/@username", forward: "/random.groovy?username=@username"
all "/upload", forward: "/upload.groovy"
post "/save", forward: "/store.groovy"
get "/browse", forward: "/browse.groovy"
all "/g/@username", forward: "/random.groovy?username=@username"
all "/upload", forward: "/upload.groovy"
post "/save", forward: "/store.groovy"
get "/browse", forward: "/browse.groovy"
all "/i/@hash", forward: "/load.groovy?hash=@hash"
all "/u/@hash", forward: "/upvote.groovy?hash=@hash"
all "/m/@hash", forward: "/mylist.groovy?hash=@hash"
all "/l/@username", forward: "/userlist.groovy?username=@username"
all "/l/@username", forward: "/userlist.groovy?username=@username"
all "/r/@hash", forward: "/report.groovy?hash=@hash"
all "/p/@hash", forward: "/picture.groovy?hash=@hash"
all "/d/@hash", forward: "/delete.groovy?hash=@hash"
Expand Down

0 comments on commit 5d63e34

Please sign in to comment.