gordon-cs / Project-Phoenix

The Electronic Room Condition Inventory
0 stars 0 forks source link

Add logging abilities #157

Closed superpowers11 closed 6 years ago

superpowers11 commented 7 years ago

Set up logging functionality - need to figure out the infrastructure for logging

eanyanwu commented 7 years ago

Currently thinking about this while I wait on the test accounts to be created. I am thinking that the most useful logs are those of exceptions. So we can have something as simple as: (Time : Exception)

This msdn article suggests Exception filters as one way to the implement the logging. What do you think?

superpowers11 commented 7 years ago

Exception filters seem like a decent way to go. I briefly looked over the article; would you use the OnException method override? I did a quick web search on error logging in C# MVC and something called ELMAH came up a few times - a NuGet package to facilitate logging. Have you heard of it? This blog explains it briefly, and here is the home page

eanyanwu commented 7 years ago

I've heard the name, never knew what it did, but wow. It is amazing. I think the best part is the notification via slack/email etc... Unfortunately it isn't free :/ https://elmah.io/pricing/

superpowers11 commented 7 years ago

That's ok, we can just take it out of the abundant budget the board of trustees has generously issued to this important work for the College. ._.

eanyanwu commented 7 years ago

Lol. I'll briefly looking to see if there are other alternatives that have a similar setup...stay tuned

eanyanwu commented 7 years ago

Ok, so I read 60% of this and skimmed the rest. Summary: There are a few options with pros and cons depending on what we need. The first section is actually pretty informative. ELMAH is mentioned and briefly explained at the very end too.

What I think we need:

Anything else you can think of?