-
Notifications
You must be signed in to change notification settings - Fork 125
PathRoller doesn't log to SelfLog on exception #192
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
Comments
Thanks, we'll take a look 👍 |
After digging a bit further it looks like our issue is caused by the fact that the
I'm not sure if there is an architectural reason for this code so it might well be not the reason for our issue. If this is the correct solution I might be able to find some time to create a PR if that would help it get fixed. |
In general, the Serilog API will throw for usage errors (e.g. passing I think widening the |
Makes sense. I forked and made the change here: https://github.com/pvandervelde/serilog-sinks-file/tree/feature/fix-192. I tried running the
I'm guessing I named the branch wrong? Is there a "How to contribute" document somewhere? |
@nblumhardt Did you get a chance to review @pvandervelde fix at all please? |
Thanks for the nudge @preet-serko. @pvandervelde, the issue will be the slash in the branch name, sorry. |
Ah right. I'll change the branch name and try again |
@nblumhardt I've created a PR but I started from the master branch. Do you want me to rebase on |
Thanks Petrik, that would be great. |
@nblumhardt Rebased and force pushed to the PR. Let me know if any other changes are required. |
That's great, thanks @pvandervelde 👍 |
When the PathRoller encounters an exception it doesn't log to the Serilog self-log. Using the following code
with the following app.config file
Running this code throws the following exception
This exception terminates the application because it is not caught anywhere. Given that Serilog internally handles exceptions and that we have turned on the self-log I would have expected that the PathRoller would have caught the exception and then written it to the selflog.
We can of course catch the exception but because the exception occurs during the configuration of our logging system it means that it is more difficult to store the information in a way that we can obtain it from the server.
The text was updated successfully, but these errors were encountered: