Skip to content

Commit

Permalink
Merge pull request telefonicaid#1517 from telefonicaid/task/remove_pl…
Browse files Browse the repository at this point in the history
…aceholder_logs_jexl

simplify logs format about jexl
  • Loading branch information
fgalan authored Oct 16, 2023
2 parents bf1e46b + 4744733 commit 17bec42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/plugins/jexlParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function parse(expression, context, callback) {
result = jexl.evalSync(expression, context);
//avoid undefined result
result = result !== undefined ? result : null;
logger.debug(logContext, 'parse expression "[%j]" over "[%j]" result "[%j]" ', expression, context, result);
logger.debug(logContext, 'parse expression %j over %j result %j ', expression, context, result);
} catch (e) {
error = new errors.InvalidExpression(expression);
if (callback) {
Expand Down Expand Up @@ -103,7 +103,7 @@ function applyExpression(expression, context, typeInformation) {
// https://github.com/TomFrost/Jexl/issues/133
deleteNulls(context);
const result = parse(expression, context);
logger.debug(logContext, 'applyExpression "[%j]" over "[%j]" result "[%j]" ', expression, context, result);
logger.debug(logContext, 'applyExpression %j over %j result %j ', expression, context, result);
const expressionResult = result !== undefined ? result : expression;
return expressionResult;
}
Expand All @@ -126,7 +126,7 @@ function contextAvailable(expression, context) {
jexl.evalSync(expression, context);
return true;
} catch (e) {
logger.info(logContext, 'Wrong expression found "[%j]" over "[%j]", it will be ignored', expression, context);
logger.info(logContext, 'Wrong expression found %j over %j, it will be ignored', expression, context);
return false;
}
}
Expand Down

0 comments on commit 17bec42

Please sign in to comment.