Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging in Watchbot4 #225

Merged
merged 2 commits into from Jul 2, 2018
Merged

Logging in Watchbot4 #225

merged 2 commits into from Jul 2, 2018

Conversation

tapaswenipathak
Copy link
Contributor

@tapaswenipathak tapaswenipathak commented Jun 20, 2018

Closes #204.

cc @mapbox/platform-engine-room.

@jakepruitt
Copy link

Per conversation, we will need to create two different loggers inside of the lib/worker.js:

constructor(message = {}, options = {}) {
  // ...

  this.workerLogger = Logger.create('worker', message);
  this.watcherLogger = Logger.create('watchbot', message);
}

The workerLogger will be used within the child method as the destination of the child.stdout.pipe(workerLogger.stream()), that way all child logs will be prefixed with worker.

The watcherLogger will be used everywhere else in the file, like the success and failure messages that are meta information surrounding the child process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants