Skip to content

Logging stopped on a log file that I manually edit #3439

Answered by ppkarwasz
xsimo asked this question in Q&A
Discussion options

You must be logged in to vote

It worked well until when I opened the target file marker.log and edit it with vi. Then, logging stopped to that marker.log file.

Could this be related to the operating system file handle or the pointer that the application has in that file ?

This is caused by the way Vim writes changes to the current file:

  • If backupcopy is set to yes, Vim will edit the content of the current file. Logging should continue without problems.
  • If backupcopy is set to no, Vim will rename (and delete) the current file and create a new one in its place. The new file will have the same name, but a different inode number. Log4j will continue logging to the deleted file (the old inode).

If you want to edit log …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xsimo
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants