This commit is contained in:
Sefinek 2024-12-25 01:50:49 +01:00
parent e4c43b8b0c
commit 47c0879b86

View file

@ -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 => {