Skip to content

Commit

Permalink
chore(datasource/custom): log data before jsonata processing (#30241)
Browse files Browse the repository at this point in the history
  • Loading branch information
secustor committed Jul 18, 2024
1 parent 1c0fc37 commit a13ab2c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/modules/datasource/custom/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export class CustomDatasource extends Datasource {
return null;
}

logger.trace({ data }, `Custom manager fetcher '${format}' returned data.`);

for (const transformTemplate of transformTemplates) {
const expression = jsonata(transformTemplate);
data = await expression.evaluate(data);
Expand Down
16 changes: 16 additions & 0 deletions lib/modules/datasource/custom/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@ All available options:
}
```

### Debugging

Renovate writes tracing log entries before transformation starts and after if Renovate finds an unexpected data format.
To surface this data you can use `logLevelRemap` to surface this data on the App or run Renovate in dryRun mode and log level set to `trace` locally.

```json
{
"logLevelRemap": [
{
"matchMessage": "/^Custom manager fetcher/",
"newLogLevel": "info"
}
]
}
```

### Formats

#### JSON
Expand Down

0 comments on commit a13ab2c

Please sign in to comment.