I applied the following setting on the .conf for rsyslog, it can read logs from the file.
module(load="imfile" PollingInterval="10")
input(
type="imfile" File="/root/loggingFile.log"
Tag="tag2"
Severity="notice"
Facility="local0"
)
The logs in the file also come as follows-directly the same, nothing different (like time);
trying1
trying2
trying3
...
tryingNew
It can read the logs, but every time a new line is written, it reads the whole file from the beginning. When I make freshStartTail = on, even though the new line appears, it does not read at all this time.
How can I solve this problem?