Skip to content

Commit 77185d3

Browse files
author
Chris Wiechmann
committed
Added debug messages to log filenames
1 parent 998ba7a commit 77185d3

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

api-builder-plugin-fn-file/Changelog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
88

9-
## [0.0.6] 2021-01-10
9+
## [0.0.8] 2021-04-06
10+
### Added
11+
- Added debug messages to log filenames used to read and write files
12+
13+
## [0.0.7] 2021-01-10
1014
### Added
1115
- Added the possibility to defined a max read limit
1216

api-builder-plugin-fn-file/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@axway-api-builder-ext/api-builder-plugin-fn-file",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "File Flow-Node to read/write files as part of an API-Builder flow.",
55
"author": "Chris Wiechmann <cwiechmann@axway.com> (http://www.axway.com)",
66
"license": "Apache-2.0",

api-builder-plugin-fn-file/src/csvFileActions.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ async function readCVSFile(params, options) {
5252
if (params.relax_column_count) csvParseOptions.relax_column_count = params.relax_column_count;
5353
if (params.columns) csvParseOptions.columns = params.columns;
5454

55+
options.logger.debug(`Trying to read file: '${filename}'`);
56+
5557
const endEvent = new Promise((resolve, reject) => {
5658
try {
5759
fs.createReadStream(filename)

api-builder-plugin-fn-file/src/standardFileActions.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ async function writeFile(params, options) {
5151
if(data instanceof Object && stringify) {
5252
data = JSON.stringify(data);
5353
}
54+
options.logger.debug(`Going to write to filename: '${filename}'`);
5455
try {
5556
await fs.writeFile(filename, data, {encoding: dataEncoding, flag: flag});
5657
} catch(ex) {
@@ -75,6 +76,7 @@ async function readFile(params, options) {
7576
if(data) {
7677
filename = await interpolate(filename, data, logger);
7778
}
79+
options.logger.debug(`Trying to read file: '${filename}'`);
7880

7981
const chunkSize = 8192;
8082
let bytesRead = 0;

0 commit comments

Comments
 (0)