Skip to content
Browse files

Some other tweaks in the README, added a "prior art" blog post

  • Loading branch information...
1 parent d2e4de1 commit fc1dc0e5e947c33670d7728995303701e8e4f8de @mapio committed Dec 6, 2011
View
75 README.rst
@@ -7,19 +7,30 @@ heroku-log4mongo
|flattr|
-``heroku-log4mongo`` is a demo application showing an hack to obtain 240MB of
-free cloud logging for your `Heroku <http://www.heroku.com/>`_ apps, that is a
-(very rough, no fancy interface, no fun) *free version* of the `Loggly
-<http://addons.heroku.com/loggly>`_ addon, but with indefinite *data
-retention*.
-
-The key is the `log4mongo <http://github.com/log4mongo/log4mongo-python>`_
-library that very easily allows you to use `mongodb
-<http://www.mongodb.org/>`_ as a logging endopint, plus the (free) `mongolab
-<http://mongolab.com/>`_ service, offering (for free) a 240MB database (with a
-nice web interface); this demo applicaton is based on `Flask
-<http://flask.pocoo.org/>`_ but every other framework will work (albeit being
-less pleasurable to program).
+``heroku-log4mongo`` is a demo application showing how to obtain 240MB of free
+cloud logging in a `mongodb <http://www.mongodb.org/>`_ for your `Heroku
+<http://www.heroku.com/>`_ deployments -- a sort of (very rough) *free
+version* of the `Loggly <http://addons.heroku.com/loggly>`_ addon, but with
+indefinite *data retention*.
+
+To `use mongodb for logging
+<http://blog.mongodb.org/post/172254834/mongodb-is-fantastic-for-logging>`_ is
+not a new idea; the (I think original and nice) contribution of this sample
+code is to emphasize:
+
+* the very nice `log4mongo <http://github.com/log4mongo/log4mongo-python>`_
+ library making all this pretty easy,
+
+* the awsome `mongolab <http://mongolab.com/>`_ service, offering *for free* a
+ 240MB database in the cloud (with a nice web interface);
+
+* a nice hack to make `gunicorn <http://gunicorn.org/>`_ send its *access
+ log* to the cloud,
+
+* lasts but not least, how Heroku makes all this quite a piece of cake!
+
+This demo applicaton is based on `Flask <http://flask.pocoo.org/>`_ but every
+other framework will work (albeit being less pleasurable to program).
The following part of this README describes how to use the demo application
(locally and on Heroku), for more details on how the code works and the idea
@@ -28,8 +39,8 @@ behind it, please check the `blog post
<http://santini.dsi.unimi.it/extras/ph/>`_ blog.
-Prepare the Heroku environment
-------------------------------
+Setup Heroku and mongolab
+-------------------------
To test this application, setup your Heroku environment as usual (assuming
that the ``heroku`` and ``foreman`` gems are installed)::
@@ -43,16 +54,16 @@ then add to it the *free* `mongolab:starter` addon to your app and set the
$ heroku addons:add mongolab:starter
$ heroku config:add VERSION=production
-that will give you a 240MB `mongodb <http://www.mongodb.org/>`_ freely hosted
-in the cloud (the app uses ``VERSION`` to distinguish between the locally run
-test from the actual heroku deployed app). As easy as pie!
+that will give you a 240MB mongodb hosted in the cloud for free, as easy as
+pie! The ``VERSION`` variable is used to distinguish between the local and
+deployed versions of the application.
Test locally
------------
You can now setup a loccal testing environment using `virtualenvwrapper
-<http://www.doughellmann.com/projects/virtualenvwrapper/>`_)::
+<http://www.doughellmann.com/projects/virtualenvwrapper/>`_::
$ mktmpenv; cd -
$ pip install -r requirements.txt
@@ -64,8 +75,8 @@ URI of your databse, and the ``VERSION`` of the application with::
$ heroku config -s | grep 'MONGOLAB_URI' > .env
$ echo 'VERSION=developement' >> .env
-You are now ready to test locally: run the app and access its home with
-``curl``::
+(or conveniently use the ``./scripts/set_env`` script). You are now ready to
+test locally: run the app and access its home with ``curl``::
$ foreman start -p 8000
22:13:02 web.1 | started with pid 22744
@@ -94,12 +105,10 @@ You are now ready to try the application in production::
where ``<YOUR_APP>`` is the app name you got as output of the ``heroku
create`` command above. You can now get your logs from the cloud, for instance
-using the simple ``get_logs`` script::
+using the simple provided script::
- $ export MONGOLAB_URI
- $ source .env
$ ./scripts/get_logs
- 2.230.67.34 - - [06/Dec/2011:21:19:08] "GET / HTTP/1.1" 200 13 "-" "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5"
+ 4.231.57.32 - - [06/Dec/2011:21:19:08] "GET / HTTP/1.1" 200 13 "-" "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5"
$ ./scripts/get_logs -e
2011-12-06 21:15:19+00:00 Starting gunicorn 0.13.4
2011-12-06 21:15:19+00:00 Listening at: http://0.0.0.0:32652 (3)
@@ -108,10 +117,18 @@ using the simple ``get_logs`` script::
$ ./scripts/get_logs -a
2011-12-06 21:19:08+00:00 This is an application log message
-which will respectively output yuor *access log*, *error log* and *application log*.
+which will respectively output yuor *access log*, *error log* and *application
+log*, or you can access the nice web interface provided by the addon with::
+
+ $ heroku addons:open mongolab:starter
+
+When you are down playing with this, don't forget to **scale down**::
-The steps of setting up ``.env`` and sourcing it can be convenienty obtained by::
+ $ heroku scale web=0
- $ source ./scripts/set_env
+not to incur in unanticipated costs!
-that will prepare the file, export the variables and source it.
+If you plan to use this in a real production application consider `capped
+collections <http://www.mongodb.org/display/DOCS/Capped+Collections>`_ (a very
+high performance auto-FIFO database) as a simple way of controlling the size of
+your logs.
View
0 fl/__init__.py → heroku-log4mongo/__init__.py
File renamed without changes.
View
0 fl/__init__.pyc → heroku-log4mongo/__init__.pyc
File renamed without changes.
View
6 fl/logger.py → heroku-log4mongo/logger.py
@@ -16,7 +16,7 @@
# "free-logging". If not, see <http://www.gnu.org/licenses/>.
from logging import INFO, getLogger, StreamHandler, Formatter, DEBUG, INFO
-from os import environ as ENV
+from os import environ
from urlparse import urlparse
from gunicorn.glogging import Logger
@@ -25,7 +25,7 @@
# parse the MONGOLAB_URI environment variable to get the auth/db info
-MONGOLAB_URI_PARSED = urlparse( ENV[ 'MONGOLAB_URI' ] )
+MONGOLAB_URI_PARSED = urlparse( environ[ 'MONGOLAB_URI' ] )
MONGOLAB_CONF_DICT = dict(
host = MONGOLAB_URI_PARSED.hostname,
port = MONGOLAB_URI_PARSED.port,
@@ -36,7 +36,7 @@
# determine if we are running in production (e.g., on Heroku), or locally
-PRODUCTION = ENV[ 'VERSION' ] == 'production'
+PRODUCTION = environ[ 'VERSION' ] == 'production'
# setup the root logger so that application logs go to mongolab
View
0 fl/logger.pyc → heroku-log4mongo/logger.pyc
File renamed without changes.
View
431 out.html
@@ -0,0 +1,431 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" />
+<title>heroku-log4mongo</title>
+<style type="text/css">
+
+/*
+:Author: David Goodger (goodger@python.org)
+:Id: $Id: html4css1.css 7056 2011-06-17 10:50:48Z milde $
+:Copyright: This stylesheet has been placed in the public domain.
+
+Default cascading style sheet for the HTML output of Docutils.
+
+See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
+customize this style sheet.
+*/
+
+/* used to remove borders from tables and images */
+.borderless, table.borderless td, table.borderless th {
+ border: 0 }
+
+table.borderless td, table.borderless th {
+ /* Override padding for "table.docutils td" with "! important".
+ The right padding separates the table cells. */
+ padding: 0 0.5em 0 0 ! important }
+
+.first {
+ /* Override more specific margin styles with "! important". */
+ margin-top: 0 ! important }
+
+.last, .with-subtitle {
+ margin-bottom: 0 ! important }
+
+.hidden {
+ display: none }
+
+a.toc-backref {
+ text-decoration: none ;
+ color: black }
+
+blockquote.epigraph {
+ margin: 2em 5em ; }
+
+dl.docutils dd {
+ margin-bottom: 0.5em }
+
+object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
+ overflow: hidden;
+}
+
+/* Uncomment (and remove this text!) to get bold-faced definition list terms
+dl.docutils dt {
+ font-weight: bold }
+*/
+
+div.abstract {
+ margin: 2em 5em }
+
+div.abstract p.topic-title {
+ font-weight: bold ;
+ text-align: center }
+
+div.admonition, div.attention, div.caution, div.danger, div.error,
+div.hint, div.important, div.note, div.tip, div.warning {
+ margin: 2em ;
+ border: medium outset ;
+ padding: 1em }
+
+div.admonition p.admonition-title, div.hint p.admonition-title,
+div.important p.admonition-title, div.note p.admonition-title,
+div.tip p.admonition-title {
+ font-weight: bold ;
+ font-family: sans-serif }
+
+div.attention p.admonition-title, div.caution p.admonition-title,
+div.danger p.admonition-title, div.error p.admonition-title,
+div.warning p.admonition-title {
+ color: red ;
+ font-weight: bold ;
+ font-family: sans-serif }
+
+/* Uncomment (and remove this text!) to get reduced vertical space in
+ compound paragraphs.
+div.compound .compound-first, div.compound .compound-middle {
+ margin-bottom: 0.5em }
+
+div.compound .compound-last, div.compound .compound-middle {
+ margin-top: 0.5em }
+*/
+
+div.dedication {
+ margin: 2em 5em ;
+ text-align: center ;
+ font-style: italic }
+
+div.dedication p.topic-title {
+ font-weight: bold ;
+ font-style: normal }
+
+div.figure {
+ margin-left: 2em ;
+ margin-right: 2em }
+
+div.footer, div.header {
+ clear: both;
+ font-size: smaller }
+
+div.line-block {
+ display: block ;
+ margin-top: 1em ;
+ margin-bottom: 1em }
+
+div.line-block div.line-block {
+ margin-top: 0 ;
+ margin-bottom: 0 ;
+ margin-left: 1.5em }
+
+div.sidebar {
+ margin: 0 0 0.5em 1em ;
+ border: medium outset ;
+ padding: 1em ;
+ background-color: #ffffee ;
+ width: 40% ;
+ float: right ;
+ clear: right }
+
+div.sidebar p.rubric {
+ font-family: sans-serif ;
+ font-size: medium }
+
+div.system-messages {
+ margin: 5em }
+
+div.system-messages h1 {
+ color: red }
+
+div.system-message {
+ border: medium outset ;
+ padding: 1em }
+
+div.system-message p.system-message-title {
+ color: red ;
+ font-weight: bold }
+
+div.topic {
+ margin: 2em }
+
+h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
+h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
+ margin-top: 0.4em }
+
+h1.title {
+ text-align: center }
+
+h2.subtitle {
+ text-align: center }
+
+hr.docutils {
+ width: 75% }
+
+img.align-left, .figure.align-left, object.align-left {
+ clear: left ;
+ float: left ;
+ margin-right: 1em }
+
+img.align-right, .figure.align-right, object.align-right {
+ clear: right ;
+ float: right ;
+ margin-left: 1em }
+
+img.align-center, .figure.align-center, object.align-center {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.align-left {
+ text-align: left }
+
+.align-center {
+ clear: both ;
+ text-align: center }
+
+.align-right {
+ text-align: right }
+
+/* reset inner alignment in figures */
+div.align-right {
+ text-align: inherit }
+
+/* div.align-center * { */
+/* text-align: left } */
+
+ol.simple, ul.simple {
+ margin-bottom: 1em }
+
+ol.arabic {
+ list-style: decimal }
+
+ol.loweralpha {
+ list-style: lower-alpha }
+
+ol.upperalpha {
+ list-style: upper-alpha }
+
+ol.lowerroman {
+ list-style: lower-roman }
+
+ol.upperroman {
+ list-style: upper-roman }
+
+p.attribution {
+ text-align: right ;
+ margin-left: 50% }
+
+p.caption {
+ font-style: italic }
+
+p.credits {
+ font-style: italic ;
+ font-size: smaller }
+
+p.label {
+ white-space: nowrap }
+
+p.rubric {
+ font-weight: bold ;
+ font-size: larger ;
+ color: maroon ;
+ text-align: center }
+
+p.sidebar-title {
+ font-family: sans-serif ;
+ font-weight: bold ;
+ font-size: larger }
+
+p.sidebar-subtitle {
+ font-family: sans-serif ;
+ font-weight: bold }
+
+p.topic-title {
+ font-weight: bold }
+
+pre.address {
+ margin-bottom: 0 ;
+ margin-top: 0 ;
+ font: inherit }
+
+pre.literal-block, pre.doctest-block, pre.math {
+ margin-left: 2em ;
+ margin-right: 2em }
+
+span.classifier {
+ font-family: sans-serif ;
+ font-style: oblique }
+
+span.classifier-delimiter {
+ font-family: sans-serif ;
+ font-weight: bold }
+
+span.interpreted {
+ font-family: sans-serif }
+
+span.option {
+ white-space: nowrap }
+
+span.pre {
+ white-space: pre }
+
+span.problematic {
+ color: red }
+
+span.section-subtitle {
+ /* font-size relative to parent (h1..h6 element) */
+ font-size: 80% }
+
+table.citation {
+ border-left: solid 1px gray;
+ margin-left: 1px }
+
+table.docinfo {
+ margin: 2em 4em }
+
+table.docutils {
+ margin-top: 0.5em ;
+ margin-bottom: 0.5em }
+
+table.footnote {
+ border-left: solid 1px black;
+ margin-left: 1px }
+
+table.docutils td, table.docutils th,
+table.docinfo td, table.docinfo th {
+ padding-left: 0.5em ;
+ padding-right: 0.5em ;
+ vertical-align: top }
+
+table.docutils th.field-name, table.docinfo th.docinfo-name {
+ font-weight: bold ;
+ text-align: left ;
+ white-space: nowrap ;
+ padding-left: 0 }
+
+h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
+h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
+ font-size: 100% }
+
+ul.auto-toc {
+ list-style-type: none }
+
+</style>
+</head>
+<body>
+<div class="document" id="heroku-log4mongo">
+<h1 class="title">heroku-log4mongo</h1>
+
+<p><a class="reference external" href="https://flattr.com/submit/auto?user_id=mapio&amp;url=https://github.com/mapio/heroku-log4mongo&amp;title=heroku-log4mongo&amp;language=en_GB&amp;tags=github&amp;category=software"><img alt="Flattr this git repo" src="http://api.flattr.com/button/flattr-badge-large.png" /></a></p>
+<p><tt class="docutils literal"><span class="pre">heroku-log4mongo</span></tt> is a demo application showing how to obtain 240MB of free
+cloud logging in a <a class="reference external" href="http://www.mongodb.org/">mongodb</a> for your <a class="reference external" href="http://www.heroku.com/">Heroku</a> deployments -- a sort of (very rough) <em>free
+version</em> of the <a class="reference external" href="http://addons.heroku.com/loggly">Loggly</a> addon, but with
+indefinite <em>data retention</em>.</p>
+<p>To <a class="reference external" href="http://blog.mongodb.org/post/172254834/mongodb-is-fantastic-for-logging">use mongodb for logging</a> is
+not a new idea; the (I think original and nice) contribution of this sample
+code is to emphasize:</p>
+<ul class="simple">
+<li>the very nice <a class="reference external" href="http://github.com/log4mongo/log4mongo-python">log4mongo</a>
+library making all this pretty easy,</li>
+<li>the awsome <a class="reference external" href="http://mongolab.com/">mongolab</a> service, offering <em>for free</em> a
+240MB database in the cloud (with a nice web interface);</li>
+<li>a nice hack to make <a class="reference external" href="http://gunicorn.org/">gunicorn</a> send its <em>access
+log</em> to the cloud,</li>
+<li>lasts but not least, how Heroku makes all this quite a piece of cake!</li>
+</ul>
+<p>This demo applicaton is based on <a class="reference external" href="http://flask.pocoo.org/">Flask</a> but every
+other framework will work (albeit being less pleasurable to program).</p>
+<p>The following part of this README describes how to use the demo application
+(locally and on Heroku), for more details on how the code works and the idea
+behind it, please check the <a class="reference external" href="http://santini.dsi.unimi.it/extras/ph/logging-in-the-cloud-for-free-on-heroku-and-mongolab.html">blog post</a> on my <a class="reference external" href="http://santini.dsi.unimi.it/extras/ph/">ProcrastinHacking</a> blog.</p>
+<div class="section" id="setup-heroku-and-mongolab">
+<h1>Setup Heroku and mongolab</h1>
+<p>To test this application, setup your Heroku environment as usual (assuming
+that the <tt class="docutils literal">heroku</tt> and <tt class="docutils literal">foreman</tt> gems are installed):</p>
+<pre class="literal-block">
+$ git clone git://github.com/mapio/heroku-log4mongo.git
+$ heroku create --stack cedar
+</pre>
+<p>then add to it the <em>free</em> <cite>mongolab:starter</cite> addon to your app and set the
+<tt class="docutils literal">VERSION</tt>:</p>
+<pre class="literal-block">
+$ heroku addons:add mongolab:starter
+$ heroku config:add VERSION=production
+</pre>
+<p>that will give you a 240MB mongodb hosted in the cloud for free, as easy as
+pie! The <tt class="docutils literal">VERSION</tt> variable is used to distinguish between the local and
+deployed versions of the application.</p>
+</div>
+<div class="section" id="test-locally">
+<h1>Test locally</h1>
+<p>You can now setup a loccal testing environment using <a class="reference external" href="http://www.doughellmann.com/projects/virtualenvwrapper/">virtualenvwrapper</a>:</p>
+<pre class="literal-block">
+$ mktmpenv; cd -
+$ pip install -r requirements.txt
+</pre>
+<p>to use the app locally you need to setup the local <tt class="docutils literal">.env</tt> file used by
+<tt class="docutils literal">foreman</tt> to configure your app, in particular you need to store in it the
+URI of your databse, and the <tt class="docutils literal">VERSION</tt> of the application with:</p>
+<pre class="literal-block">
+$ heroku config -s | grep 'MONGOLAB_URI' &gt; .env
+$ echo 'VERSION=developement' &gt;&gt; .env
+</pre>
+<p>(or conveniently use the <tt class="docutils literal">./scripts/set_env</tt> script). You are now ready to
+test locally: run the app and access its home with <tt class="docutils literal">curl</tt>:</p>
+<pre class="literal-block">
+$ foreman start -p 8000
+22:13:02 web.1 | started with pid 22744
+22:13:02 web.1 | 2011-12-06 22:13:02 [22745] [INFO] Starting gunicorn 0.13.4
+22:13:02 web.1 | 2011-12-06 22:13:02 [22745] [INFO] Listening at: http://0.0.0.0:8000 (22745)
+22:13:02 web.1 | 2011-12-06 22:13:02 [22745] [INFO] Using worker: sync
+22:13:02 web.1 | 2011-12-06 22:13:02 [22746] [INFO] Booting worker with pid: 22746
+$ curl http://0.0.0.0:8000
+Hello, world!
+22:09:53 web.1 | 2011.12:06 22:09:53 [22691] [DEBUG/APPLICATION] This is an application log message
+22:09:53 web.1 | 2011.12:06 22:09:53 [22691] [INFO/ACCESS] 127.0.0.1 - - [06/Dec/2011:22:09:53] &quot;GET / HTTP/1.1&quot; 200 13 &quot;-&quot; &quot;curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5&quot;
+</pre>
+<p>the first output lines being the normal app startup, followed by <tt class="docutils literal">curl</tt>
+output, then a <em>log message coming from the application</em>, and finally a
+typical <em>access log</em> message.</p>
+</div>
+<div class="section" id="deploy">
+<h1>Deploy</h1>
+<p>You are now ready to try the application in production:</p>
+<pre class="literal-block">
+$ git push heroku master
+$ heroku scale web=1
+$ curl http://&lt;YOUR_APP&gt;.herokuapp.com/
+</pre>
+<p>where <tt class="docutils literal">&lt;YOUR_APP&gt;</tt> is the app name you got as output of the <tt class="docutils literal">heroku
+create</tt> command above. You can now get your logs from the cloud, for instance
+using the simple provided script:</p>
+<pre class="literal-block">
+$ ./scripts/get_logs
+4.231.57.32 - - [06/Dec/2011:21:19:08] &quot;GET / HTTP/1.1&quot; 200 13 &quot;-&quot; &quot;curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5&quot;
+$ ./scripts/get_logs -e
+2011-12-06 21:15:19+00:00 Starting gunicorn 0.13.4
+2011-12-06 21:15:19+00:00 Listening at: http://0.0.0.0:32652 (3)
+2011-12-06 21:15:19+00:00 Using worker: sync
+2011-12-06 21:15:19+00:00 Booting worker with pid: 10
+$ ./scripts/get_logs -a
+2011-12-06 21:19:08+00:00 This is an application log message
+</pre>
+<p>which will respectively output yuor <em>access log</em>, <em>error log</em> and <em>application
+log</em>, or you can access the nice web interface provided by the addon with:</p>
+<pre class="literal-block">
+$ heroku addons:open mongolab:starter
+</pre>
+<p>When you are down playing with this, don't forget to <strong>scale down</strong>:</p>
+<pre class="literal-block">
+$ heroku scale web=0
+</pre>
+<p>not to incur in unanticipated costs!</p>
+<p>If you plan to use this in a real production application consider <a class="reference external" href="http://www.mongodb.org/display/DOCS/Capped+Collections">capped
+collections</a> (a very
+high performance auto-FIFO database) as a simple way of controlling the size of
+your logs.</p>
+</div>
+</div>
+</body>
+</html>
View
23 scripts/get_logs
@@ -1,14 +1,29 @@
#!/usr/bin/env python
-from os import environ as ENV
+# Copyright 2011, Massimo Santini <santini@dsi.unimi.it>
+#
+# This file is part of "heroku-log4mongo".
+#
+# "No Fuss Bookmarks" is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# "heroku-log4mongo" is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# "heroku-log4mongo". If not, see <http://www.gnu.org/licenses/>.
+
from urlparse import urlparse
from sys import argv
from pymongo import Connection
-
-MONGOLAB_URI = ENV[ 'MONGOLAB_URI' ]
-
+# this is horrible, works if set_env outputs MONGOLAB_URI on the first line!
+MONGOLAB_URI = open( '.env' ).readline().strip().split( '=' )[ 1 ]
conn = Connection( MONGOLAB_URI )
db = conn[ urlparse( MONGOLAB_URI ).path[ 1: ] ]
View
10 scripts/set_env
@@ -2,22 +2,20 @@
# Copyright 2011, Massimo Santini <santini@dsi.unimi.it>
#
-# This file is part of "free-logging".
+# This file is part of "heroku-log4mongo".
#
# "No Fuss Bookmarks" is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
-# "free-logging" is distributed in the hope that it will be useful, but
+# "heroku-log4mongo" is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
-# "free-logging". If not, see <http://www.gnu.org/licenses/>.
+# "heroku-log4mongo". If not, see <http://www.gnu.org/licenses/>.
-export MONGOLAB_URI VERSION
heroku config -s | grep 'MONGOLAB_URI' > .env
-echo VERSION=developement >> .env
-source .env
+echo 'VERSION=developement' >> .env

0 comments on commit fc1dc0e

Please sign in to comment.
Something went wrong with that request. Please try again.