Better logging with winston

This commit is contained in:
Florent Vilmart
2016-03-26 13:47:44 -04:00
parent d47a756f80
commit 5c1fe3a325
15 changed files with 180 additions and 255 deletions

View File

@@ -1,3 +1,4 @@
import log from './logger';
var mongodb = require('mongodb');
var Parse = require('parse/node').Parse;
@@ -691,13 +692,13 @@ function untransformObject(schema, className, mongoObject, isNestedObject = fals
expected = schema.getExpectedType(className, newKey);
}
if (!expected) {
console.log(
log.info('transform.js',
'Found a pointer column not in the schema, dropping it.',
className, newKey);
break;
}
if (expected && expected[0] != '*') {
console.log('Found a pointer in a non-pointer column, dropping it.', className, key);
log.info('transform.js', 'Found a pointer in a non-pointer column, dropping it.', className, key);
break;
}
if (mongoObject[key] === null) {