Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I would like to replace the last line of file log, for making a progress bar behave in the file #5170

Closed
AntonioGomes42 opened this issue Mar 11, 2023 · 3 comments

Comments

@AntonioGomes42
Copy link

Good afternoon, everyone! I would like to create a kind of progress bar bahiviour on my logging file. I have one worker that process more than 1 million rows of data, and now it's diplaying each one in the log. I would like to know how to just replace the last or to have that feature that makes possible that beaheve of progress bar because the log file is getting to long because of that.

@welcome
Copy link

welcome bot commented Mar 11, 2023

Hi! Thanks for opening your first issue here! Please make sure to follow the issue template - so we could help you better!

@snakefoot
Copy link
Contributor

snakefoot commented Mar 12, 2023

NLog FileTarget doesn't have support for re-writing the same line, and it is not easy to make it append to existing line.

I suggest that the application writes a progress-status-line every 10 secs (Ex. setup a Timer), and then a final status-line on completetion with timings + file-size + record-count + etc.

@snakefoot
Copy link
Contributor

Closing issue as resolved, due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants