Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow user to pass logmagic log sink name to the entry point.

  • Loading branch information...
commit 7682f2cd4d039733ad3595271ab11da53254764d 1 parent 767fe7a
Tomaz Muraus Kami authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/entry.js
6 lib/entry.js
View
@@ -15,6 +15,7 @@
*
*/
+var logmagic = require('logmagic');
var log = require('logmagic').local('entry');
var optimist = require('optimist');
@@ -27,12 +28,15 @@ var plugins = require('./plugins');
exports.run = function() {
var argv, config, d;
- optimist = optimist.usage('Usage: $0 -p [port] -c [/path/to/settings.js] -s [/path/to/stack/directory/]');
+ optimist = optimist.usage('Usage: $0 -p [port] -c [/path/to/settings.js] -s [/path/to/stack/directory/] --log-sink [logmagic sink]');
optimist = optimist['default']('p', 8000);
optimist = optimist['default']('c', './local_settings');
optimist = optimist['default']('s', './stacks');
+ optimist = optimist['default']('log-sink', 'console');
argv = optimist.argv;
+ logmagic.route('__root__', logmagic.DEBUG, argv['log-sink']);
+
config = require(path.resolve(argv.c)).config;
d = new Dreadnot(config, argv.s);
Please sign in to comment.
Something went wrong with that request. Please try again.