Skip to content

Commit

Permalink
add logging initialization in bin/appium so npm will work (fix appium…
Browse files Browse the repository at this point in the history
  • Loading branch information
jlipps committed Oct 29, 2013
1 parent 8a1d434 commit f73a030
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions bin/appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
var net = require('net')
, repl = require('repl')
, colors = require('colors')
, appium = require('../lib/server/main.js')
, logFactory = require('../lib/server/logger.js')
, parser = require('../lib/server/parser.js');

var args = parser().parseArgs();
logFactory.init(args);

var appium = require('../lib/server/main.js');

var startRepl = function() {
var help = function() {
console.log("\nWelcome to the Appium CLI".cyan);
Expand Down Expand Up @@ -48,6 +53,5 @@ var startRepl = function() {
if (process.argv[2] === "shell") {
startRepl();
} else {
var args = parser().parseArgs();
appium.run(args, function() { /* console.log('Rock and roll.'.grey); */ });
}
3 changes: 2 additions & 1 deletion lib/server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ var parser = require('./parser.js')
if (require.main === module) {
args = parser().parseArgs();
logFactory.init(args);
logger = logFactory.get('appium');
}

logger = logFactory.get('appium');

var http = require('http')
, express = require('express')
, path = require('path')
Expand Down

0 comments on commit f73a030

Please sign in to comment.