BackgroundWorker & Timer, reading only new lines of a log file?

后端 未结 3 615
情深已故
情深已故 2020-12-29 11:14

My application writes a log file (currently using log4net). I\'d like to setup a timer and a background worker to read the log file and print its content into some

3条回答
  •  再見小時候
    2020-12-29 11:35

    You could keep track of the index of the last character read from the stream, and subsequently seek to that position.

    Edit: see http://dotnetperls.com/seek for examples.

提交回复
热议问题