Skip to content

Commit

Permalink
fix: more debug messages, close #7
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Dec 27, 2017
1 parent b6a15f0 commit 2f9cf80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ The Xvfb constructor takes four options:

### Debugging

Run with `DEBUG=xvfb` environment variable to see debug messages
Run with `DEBUG=xvfb` environment variable to see debug messages. If you want
to see log messages from the Xvfb process itself, use `DEBUG=xvfb,xvfb-process`.

### Thanks to

Expand Down
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Xvfb.prototype = {

let totalTime = 0
;(function checkIfStarted () {
debug('checking if started by looking at the lock file', lockFile)
debug('checking if started by looking for the lock file', lockFile)
fs.exists(lockFile, function (exists) {
if (didSpawnFail) {
// When spawn fails, the callback will immediately be called.
Expand Down Expand Up @@ -159,7 +159,10 @@ Xvfb.prototype = {
} else {
const stderr = []

self._process = spawn('Xvfb', [display].concat(self._xvfb_args))
const allArguments = [display].concat(self._xvfb_args)
debug('all Xvfb arguments', allArguments)

self._process = spawn('Xvfb', allArguments)
self._process.stderr.on('data', function (data) {
stderr.push(data.toString())

Expand Down

0 comments on commit 2f9cf80

Please sign in to comment.