NickCraver / StackExchange.Exceptional

Error handler used for the Stack Exchange network
https://nickcraver.com/StackExchange.Exceptional/
Apache License 2.0
863 stars 171 forks source link

Logging without email #103

Closed soatley closed 7 years ago

soatley commented 7 years ago

Is there a way I can use Exceptional to log messages without sending an email?

With my current set up, I have Exceptional set to send an email when an exception occurs. I'd love to use Exceptional to log messages (debug, status, etc) from the program but not send an email.

Shawn

nickalbrecht commented 7 years ago

The default behavior of Exceptional is to log the exceptions. By default, this is to an in-memory collection, however this means when your app is restarted, or in the case of a website in IIS - the application pool is recycled, that the contents of the log is lost.

If you change the default error store to be backed by something external/persistent, such as a database, then the collection of reported error persists beyond the lifecycle of the app. You can also configure that you be notified when these errors occur, so you don't have to routinely check the error log to see if there anything is actionable. This last part is likely what you have configured.

Check the documentation for Exceptional, there are details on how to set it up and ensure you have all of the parts working. In this case, that's not just recording the errors, or sending emails when they occur, but accessing the full list of errors that have been observed and recorded by exceptional.

This really isn't the place for your question though as it's not related to any bugs in Exceptional, and more just how to use it. check out the docs, they are pretty comprehensive. If you still have issues I might recommend posting the specifics of what you've tried and what you're expecting but isn't happening, on something like StackOverflow.

NickCraver commented 7 years ago

Closing out since @nickalbrecht covered this greatly. If something is unclear ping here and I'll reopen.