Revamp debug logging

Summary:
- Switch namespace prefix from `ReactNativePackager:` to `RNP:`
- Add logging for handled requests
- Log transform cache key
- Add logging for transform cache hits/misses

Reviewed By: jeanlauliac

Differential Revision: D4377867

fbshipit-source-id: 9ec2060432f8c5e68561d3fe8ec7127f76c4a081
This commit is contained in:
David Aurelio
2017-01-04 07:11:16 -08:00
committed by Facebook Github Bot
parent ea752b9655
commit 78118d5023
9 changed files with 40 additions and 14 deletions

View File

@@ -45,7 +45,7 @@ const querystring = require('querystring');
const parseUrl = require('url').parse;
const WebSocket = require('ws');
const debug = require('debug')('ReactNativePackager:InspectorProxy');
const debug = require('debug')('RNP:InspectorProxy');
const launchChrome = require('./launchChrome');
type DevicePage = {
@@ -456,7 +456,7 @@ function attachToServer(server: http.Server, pathPrefix: string): InspectorProxy
if (!module.parent) {
console.info('Starting server');
process.env.DEBUG = 'ReactNativePackager:Inspector';
process.env.DEBUG = 'RNP:Inspector';
const serverInstance = http.createServer().listen(
8081,
'localhost',