Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

timehop/log2viz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log2viz

http://log2viz.herokuapp.com/

Realtime analysis of your Heroku app logs.

Installing Locally

Requirements

Get the code

Clone the repository and install the required gems.

git clone git@github.com:heroku/log2viz.git
cd log2viz
bundle install
cp .env.sample .env

Set up OAuth

log2viz uses OAuth to fetch your application’s logs. You can create a new OAuth client via the Heroku API:

curl -i -n -X POST \
-d "client[name]=myviz&client[redirect_uri]=http://localhost:5000/auth/heroku/callback" \
https://api.heroku.com/oauth/clients

HTTP/1.1 201 Created

{
  "id":"3f1057xxxxxxxxxxxxxxx”,
  "name":"myviz",
  "description":null,
  "redirect_uri":"http://localhost:5000/auth/heroku/callback”,
  "secret":"ac6f8a482c91b0540d8xxxxxxxxxxxxxxxxxxx”,
  "trusted":false
}

As well as view your existing clients:

curl -i -n -X GET https://api.heroku.com/oauth/clients

HTTP/1.1 200 OK

[
  {
    "id":"3f1057xxxxxxxxxxxxxxx”,
    "name":"myviz",
    "description":null,
    "redirect_uri":"http://localhost:5000/auth/heroku/callback”,
    "secret":"ac6f8a482c91b0540d8xxxxxxxxxxxxxxxxxxx”,
    "trusted":false
  },
  {
    ...
  }
]

In your application’s .env, set the HEROKU_ID and HEROKU_SECRET variables to those returned by the API.

Start the server

foreman start

And you’re done! Your app will be running at http://localhost:5000

Running on Heroku

Create an application

heroku create -a myviz

Create a new OAuth client

curl -i -n -X POST \
-d "client[name]=myviz-production&client[[redirect_uri]=https://myviz.herokuapp.com/auth/heroku/callback” \
https://api.heroku.com/oauth/clients

And set the appropriate variables on your Heroku app:

heroku config:set HEROKU_ID=xxxxxxxx HEROKU_SECRET=xxxxxx HEROKU_AUTH_URL=https://id.heroku.com

Deploy

git push heroku master

Visit your app at https://myviz.herokuapp.com

About

Realtime analysis of your Heroku app logs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 50.1%
  • Ruby 49.9%