Your logs are not only for debugging

Part 2: Use cases

What to do?

Format your logs

Let's see an example

Heroku Router


      at=info method=GET path="/api/terminals.json?q=c" fwd="201.127.220.150" host=www.reserbus.mx request_id=bfac49de-cf37-4caf-9094-587f7dd6f4eb dyno=web.2 connect=1ms service=42ms status=200 bytes=1565

Search by IP


      fwd=187.193.105.101
    

Set up alerts


      at=info method=GET path="/api/terminals.json?q=c" fwd="201.127.220.150" host=www.reserbus.mx request_id=bfac49de-cf37-4caf-9094-587f7dd6f4eb dyno=web.2 connect=1ms service=42ms status=200 bytes=1565
    

See all calls by IP

Include your own GitHub application keys if you plan on making more than 60 requests in 2 hours:

docker run -e "GH_CLIENT_SECRET=11becbb840e0ff7414b19104e9e797556498fc3f" -e "GH_CLIENT_ID=639ffe9fd9dcc4f6eb4b" ryanj/gist-reveal.it

Built-in Analytics

Include your own GA-TRACKER key:

docker run -e "GA_TRACKER=UA-12345678" ryanj/gist-reveal.it

Hosting on OpenShift

You can launch this application on OpenShift in a single command:

rhc app create gistreveal nodejs-0.10 \
--from code=http://github.com/ryanj/gist-reveal.it \
DEFAULT_GIST=YOUR_DEFAULT_GIST_ID \
GH_CLIENT_SECRET=YOUR_GH_CLIENT_SECRET \
GH_CLIENT_ID=YOUR_GH_CLIENT_ID \
REVEAL_SOCKET_SECRET=0P3N-S0URC3 \
GA_TRACKER=YOUR_GA_TRACKER

Or, click here to launch on the web!

Then, use the rhc env set command to publish your application config and keys to the system environment.

Broadcasting Your Slide Transitions

with Socket.IO

docker run -e "REVEAL_WEB_HOST=YOUR_HOSTNAME_HERE" -e "REVEAL_SOCKET_SECRET=0P3N-S0URC3" ryanj/gist-reveal.it

Configure your browser as a presentation device by setting the same key in your browser's localStorage

localStorage.secret="YOUR_SECRET_KEY"

Be sure to use two different devices or brower types when testing your broadcasting relay
(FireFox vs. Chrome, desktop vs. mobile, etc.)

THE END

Revaljs by Hakim El Hattab / hakim.se

gist-reveal.it by ryanj and fkautz