feat: Add silent log level for Cloud Code (#8803)
This commit is contained in:
@@ -132,6 +132,16 @@ const defaultConfiguration = {
|
||||
allowClientClassCreation: true,
|
||||
};
|
||||
|
||||
if (silent) {
|
||||
defaultConfiguration.logLevels = {
|
||||
cloudFunctionSuccess: 'silent',
|
||||
cloudFunctionError: 'silent',
|
||||
triggerAfter: 'silent',
|
||||
triggerBeforeError: 'silent',
|
||||
triggerBeforeSuccess: 'silent',
|
||||
};
|
||||
}
|
||||
|
||||
if (process.env.PARSE_SERVER_TEST_CACHE === 'redis') {
|
||||
defaultConfiguration.cacheAdapter = new RedisCacheAdapter();
|
||||
}
|
||||
@@ -434,8 +444,8 @@ try {
|
||||
// Fetch test exclusion list
|
||||
testExclusionList = require('./testExclusionList.json');
|
||||
console.log(`Using test exclusion list with ${testExclusionList.length} entries`);
|
||||
} catch(error) {
|
||||
if(error.code !== 'MODULE_NOT_FOUND') {
|
||||
} catch (error) {
|
||||
if (error.code !== 'MODULE_NOT_FOUND') {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -445,10 +455,7 @@ global.it_id = (id, func) => {
|
||||
if (testExclusionList.includes(id)) {
|
||||
return xit;
|
||||
} else {
|
||||
if(func === undefined)
|
||||
return it;
|
||||
else
|
||||
return func;
|
||||
return func || it;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user