You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm trying to start tailing on a relative symbolic link, it keeps throwing errors like these:
ts=2021-12-08T07:28:33.967830957Z caller=level.go:63 level=error msg="failed to start tailer" error="open test.log.2021-12-08: no such file or directory" filename=/home/rangercd/temp/test.log
ts=2021-12-08T07:28:43.9682562Z caller=level.go:63 level=error msg="failed to start tailer" error="open test.log.2021-12-08: no such file or directory" filename=/home/rangercd/temp/test.log
I have these files in /home/rangercd/temp/:
total 4.0K
lrwxrwxrwx 1 rangercd rangercd 19 Dec 8 15:42 test.log -> test.log.2021-12-08
-rw-r--r-- 1 rangercd rangercd 5 Dec 8 15:41 test.log.2021-12-08
Since my program's working directory is not /home/rangercd/temp/ (for example it's running in /tmp/) , this line overwrites filename with a wrong relative path test.log.2021-12-08:
When I'm trying to start tailing on a relative symbolic link, it keeps throwing errors like these:
I have these files in
/home/rangercd/temp/
:Since my program's working directory is not
/home/rangercd/temp/
(for example it's running in/tmp/
) , this line overwritesfilename
with a wrong relative pathtest.log.2021-12-08
:tail/tail_posix.go
Line 17 in 7aa4e4a
So it's actually trying to open
/tmp/test.log.2021-12-08
, which is not exists.And I believe it should be
filepath.EvalSymlinks
here instead ofos.Readlink
The text was updated successfully, but these errors were encountered: