-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9894e3b
commit 2e281cf
Showing
3 changed files
with
32 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
|
||
module.exports = function logToFile(message) { | ||
const logFilePath = path.join(output_dir, 'codeceptjs-reportportal.log'); | ||
const timestamp = new Date().toISOString(); | ||
const logMessage = `[${timestamp}] ${message}\n`; | ||
const logFilePath = path.join(output_dir, 'codeceptjs-reportportal.log'); | ||
const timestamp = new Date().toISOString(); | ||
const logMessage = `[${timestamp}] ${message}\n`; | ||
|
||
fs.appendFile(logFilePath, logMessage, (err) => { | ||
if (err) { | ||
console.error('Failed to write to log file:', err); | ||
} | ||
}); | ||
} | ||
fs.appendFile(logFilePath, logMessage, (err) => { | ||
if (err) { | ||
console.error('Failed to write to log file:', err); | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters