Skip to content

Commit

Permalink
test: add logging to track down ci issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cknight committed Jul 28, 2020
1 parent a8159ac commit 9d95c35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions streams/fileStream/rotationStrategy.ts
Expand Up @@ -113,6 +113,7 @@ class ByteRotationStrategy implements RotationStrategy {
filename,
matchesFilePattern,
);
console.log("\n", "LogFiles: ", logFiles);
/* Given the log files, find the maximum extension that is within the
* oldest retention date. Add 1 to this value to ensure it is rotated
* along with all other log files with a lower extension */
Expand Down Expand Up @@ -142,6 +143,7 @@ class ByteRotationStrategy implements RotationStrategy {
const dest = filename + "." + (i + 1);

if (exists(source)) {
console.log("Renaming ", source, " to ", dest);
Deno.renameSync(source, dest);
}
}
Expand Down
2 changes: 0 additions & 2 deletions streams/fileStream/rotationStrategy_test.ts
Expand Up @@ -361,9 +361,7 @@ test({
assertEquals(readFile(LOG_FILE + ".2"), "1");
assert(exists(LOG_FILE + ".3"));
assertEquals(readFile(LOG_FILE + ".3"), "2");
console.log("\nbefore");
assert(exists(LOG_FILE + ".4"));
console.log("after");
assertEquals(readFile(LOG_FILE + ".4"), "3");
assert(!exists(LOG_FILE + ".6")); // check '5' wasn't rotated

Expand Down

0 comments on commit 9d95c35

Please sign in to comment.