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

if i wanna delete the file when the serilog is logging on ,what should i set the serilog ? #143

Closed
hangyejiadao opened this issue Apr 24, 2020 · 6 comments

Comments

@hangyejiadao
Copy link

No description provided.

@liviriniu
Copy link

liviriniu commented Apr 24, 2020

This Issues channel of discussion is primarily intended to deal with issues of the libraries themselves. For helping users troubleshoot their problems in using/better understand the libraries, stackoverflow.com is much more of help. Be sure to add the serilog tag to your well formed question on stackoverflow.com. This method of separating types of discussions was well thought, this way we all have a better organized environment to help each other. While contributors/members of Serilog projects are very pro support to those in need, we should understand they are making efforts in their spare time / free time and we as users are making their lives easier by staying organized. Using stackoverflow.com many more knowledgeable people will see your problem and chances are that more quickly it can be resolved.

And yes, contributors/members of Serilog projects that activate here also use stackoverflow.com and can help you there among many more others that are not seeing your question while it's addressed here. Success!

@bartelink
Copy link
Member

Also a dup of serilog/serilog#1423

@rafaelsc
Copy link
Contributor

rafaelsc commented May 3, 2020

Did you tried to set up the file sink with shared: true ?
https://github.com/serilog/serilog-sinks-file#shared-log-files

@hangyejiadao
Copy link
Author

Did you tried to set up the file sink with shared: true ?
https://github.com/serilog/serilog-sinks-file#shared-log-files

@rafaelsc of course i have set up the file sink with shared:true ,but i still cant delete it and open it in
visual studio

@rafaelsc
Copy link
Contributor

rafaelsc commented May 3, 2020

Delete a file is not possible now. You can see the issues #96 and #128.
But open a shared log file should be possible and I never had a problem before. Maybe something in your computer is not allowing that like a antivirus.
But I would suggest to open using notepad++.

@fluxion-dev
Copy link

It's sad to see that this is still an outstanding issue. Allowing the deletion of the file, and automatically re-creating it seems to be a fairly logical way of going about this. Are there any other methods available to drop the locks?

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

No branches or pull requests

6 participants