From b02e3ff0f837f924de5cfee6245afeea791f71db Mon Sep 17 00:00:00 2001 From: Michael Nutt Date: Sat, 22 Jan 2011 15:36:59 -0500 Subject: [PATCH] Update readme for geoip --- README.md | 9 +++++++-- lib/metric.js | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0061ebbb..118ab6fd 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ Installation # Copy the default configuration file cp config/app.json.sample config/app.json + # To use the map, download MaxMind's GeoIP database and extract to the root directory: + wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz + gunzip GeoLiteCity.dat.gz + Running Hummingbird ------------------------------ @@ -71,10 +75,11 @@ functions to be called whenever that property is present. Logging Customization --------------------- -Metrics are stored in lib/metrics and auto-loaded.. Each metric contains a handler function that is +Metrics are stored in lib/metrics and auto-loaded. Each metric contains a handler function that is called every time a new user event occurs. Metrics store data in the `data` object property which gets emitted to clients in intervals specified by the metric. A basic example can be found in -lib/metrics/all.js. An example of how a metric can filter based on urls is in lib/metric/sales.js. +lib/metrics/total_views.js. An example of how a metric can filter based on urls is in +lib/metric/sales.js. Display Customization diff --git a/lib/metric.js b/lib/metric.js index e8d8165c..0e729c38 100644 --- a/lib/metric.js +++ b/lib/metric.js @@ -121,10 +121,10 @@ Metric.allMetrics = function(callback) { Metric.availableMetricPaths(function(metricPath) { var m = require(metricPath); if(typeof(m.canLoad) == "function" && m.canLoad() == false) { - console.log("Skipping metric " + m.name + "."); + sys.log("Skipping metric " + m.name + "."); return; } else { - console.log("Loading metric " + m.name + "."); + sys.log("Loading metric " + m.name + "."); } // Instantiate a new metric and use the settings from the custom metrics class