Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the name of the file that is not processed by SUSHI #1307

Merged
merged 4 commits into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/fhirdefs/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export function loadCustomResources(
resourceJSON = converter.xmlToObj(xml);
} else {
invalidFileCount++;
logger.debug(`File not processed by SUSHI: ${file}`);
continue;
}
} catch (e) {
Expand Down Expand Up @@ -98,8 +99,8 @@ export function loadCustomResources(
if (invalidFileCount > 0) {
logger.info(
invalidFileCount > 1
? `Found ${invalidFileCount} files in input/* resource folders that were neither XML nor JSON. These files were not processed as resources by SUSHI.`
: `Found ${invalidFileCount} file in an input/* resource folder that was neither XML nor JSON. This file was not processed as a resource by SUSHI.`
? `Found ${invalidFileCount} files in input/* resource folders that were neither XML nor JSON. These files were not processed as resources by SUSHI. To see the unprocessed files in the logs, run SUSHI with the "--log-level debug" flag.`
: `Found ${invalidFileCount} file in an input/* resource folder that was neither XML nor JSON. This file was not processed as a resource by SUSHI. To see the unprocessed file in the logs, run SUSHI with the "--log-level debug" flag.`
);
}
}
Expand Down
Loading