Fixes
This commit is contained in:
1 parent
e4c43b8b0c
commit
47c0879b86
1 file changed
+1
-1
@@ -121,8 +121,8 @@ const processLogLine = async line => {
|
|||||||
.on('change', path => {
|
.on('change', path => {
|
||||||
const stats = fs.statSync(path);
|
const stats = fs.statSync(path);
|
||||||
if (stats.size < fileOffset) {
|
if (stats.size < fileOffset) {
|
||||||
log(1, 'File truncated. Resetting offset...');
|
|
||||||
fileOffset = 0;
|
fileOffset = 0;
|
||||||
|
log(1, 'The file has been truncated, and the offset has been reset.');
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.createReadStream(path, { start: fileOffset, encoding: 'utf8' }).on('data', chunk => {
|
fs.createReadStream(path, { start: fileOffset, encoding: 'utf8' }).on('data', chunk => {
|
||||||
|
|||||||
Reference in new issue
Block a user