Fix debug namespaces
Summary: @public Have a top-level debug namespace: `ReactNativePackager` And add a couple of debugs in the transformer. This is ground work for adding a verbose option. Reviewed By: @DmitrySoshnikov Differential Revision: D2489960
This commit is contained in:
parent
b903754116
commit
42b5cd59e4
|
@ -11,7 +11,7 @@
|
|||
const Activity = require('../../Activity');
|
||||
const AssetModule_DEPRECATED = require('../AssetModule_DEPRECATED');
|
||||
const Fastfs = require('../fastfs');
|
||||
const debug = require('debug')('ReactPackager:DependencyGraph');
|
||||
const debug = require('debug')('ReactNativePackager:DependencyGraph');
|
||||
const path = require('path');
|
||||
|
||||
class DeprecatedAssetMap {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
const debug = require('debug')('ReactPackager:DependencyGraph');
|
||||
const debug = require('debug')('ReactNativePackager:DependencyGraph');
|
||||
const util = require('util');
|
||||
const path = require('path');
|
||||
const isAbsolutePath = require('absolute-path');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const Promise = require('promise');
|
||||
const debug = require('debug')('DependencyGraph');
|
||||
const debug = require('debug')('ReactNativePackager:DependencyGraph');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ const declareOpts = require('../lib/declareOpts');
|
|||
const fs = require('fs');
|
||||
const util = require('util');
|
||||
const workerFarm = require('worker-farm');
|
||||
const debug = require('debug')('ReactNativePackager:JStransformer');
|
||||
|
||||
const readFile = Promise.denodeify(fs.readFile);
|
||||
|
||||
|
@ -86,6 +87,8 @@ class Transformer {
|
|||
return Promise.reject(new Error('No transfrom module'));
|
||||
}
|
||||
|
||||
debug('transforming file', filePath);
|
||||
|
||||
return this._cache.get(
|
||||
filePath,
|
||||
'transformedSource',
|
||||
|
@ -107,6 +110,8 @@ class Transformer {
|
|||
throw formatError(res.error, filePath);
|
||||
}
|
||||
|
||||
debug('done transforming file', filePath);
|
||||
|
||||
return new ModuleTransport({
|
||||
code: res.code,
|
||||
map: res.map,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
const Bundle = require('../Bundler/Bundle');
|
||||
const Promise = require('promise');
|
||||
const bser = require('bser');
|
||||
const debug = require('debug')('ReactPackager:SocketClient');
|
||||
const debug = require('debug')('ReactNativePackager:SocketClient');
|
||||
const fs = require('fs');
|
||||
const net = require('net');
|
||||
const path = require('path');
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
const Promise = require('promise');
|
||||
const Server = require('../Server');
|
||||
const bser = require('bser');
|
||||
const debug = require('debug')('ReactPackager:SocketServer');
|
||||
const debug = require('debug')('ReactNativePackager:SocketServer');
|
||||
const fs = require('fs');
|
||||
const net = require('net');
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ const SocketClient = require('./SocketClient');
|
|||
const SocketServer = require('./SocketServer');
|
||||
const _ = require('underscore');
|
||||
const crypto = require('crypto');
|
||||
const debug = require('debug')('ReactPackager:SocketInterface');
|
||||
const debug = require('debug')('ReactNativePackager:SocketInterface');
|
||||
const fs = require('fs');
|
||||
const net = require('net');
|
||||
const path = require('path');
|
||||
|
@ -90,7 +90,7 @@ function createServer(resolve, reject, options, sockPath) {
|
|||
|
||||
// Enable server debugging by default since it's going to a log file.
|
||||
const env = _.clone(process.env);
|
||||
env.DEBUG = 'ReactPackager:SocketServer';
|
||||
env.DEBUG = 'ReactNativePackager:SocketServer';
|
||||
|
||||
// We have to go through the main entry point to make sure
|
||||
// we go through the babel require hook.
|
||||
|
|
Loading…
Reference in New Issue