gordon-cs / Project-Phoenix

The Electronic Room Condition Inventory
0 stars 0 forks source link

Exception logging #168

Closed eanyanwu closed 7 years ago

eanyanwu commented 7 years ago

🌮 Exception logging for debugging. 🌮

157

The logs are written to "Logs\date.log" at the root of the project application folder in the following format

7/30/2017 12:00:00 AM --- [ERROR] 
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
::1 GET https://localhost:44300/Dashboard
Exception: Hello there
Inner Exception: [INNER EXCEPTION GOES HERE IF ANY]

The ::1 will be the IP address. It is being displayed that way because the client was localhost.
In case you are wondering why the User agent string lists a lot of browsers, read this.

eanyanwu commented 7 years ago

Just emailed jay about logging. He said the F:/ drive is a good place to put stuff. I still need to work on how to limit the log file sizes.

eanyanwu commented 7 years ago

Merging this now because some students are saying the system is crashing. I'll figure out the limit on log file sizes later.