Open midspace opened 9 years ago
Yeah makes sense. Currently it only notifies the admin if there was an error while loading the cfg.
I implemented a notifier that stores the notifications in a cache and sends it to all admins who are enlisted in the dedicated server's config or the to the host of a non dedicated server. The notification itself consists of a message that tells the admin what to do with the exception and where to find it in the log. Now, I wonder if we should store the notifications for a certain period of time (one or two weeks?) because all pending notifications will be lost. If we log it forever, we might have to store the notifications for a very long period of time.
Depends on how you are storing it. I only envisioned a DateTime of the last login, and an Int for a counter. I didn't think much further than that. :(
All exceptions should be stored, indefinitely I think. Until someone purposely deletes the log file. Message notifications should at least be permanent until they are read. And then become temporary.
The notifications are very simple. They consist of a DateTime that is set when they are created and of a string that can be set to anything. I just thought if we'll have more types of notifications in future, we can add them easily and do not need to write everything anew.
If everything goes as planned, I'll create the commit today.
We need to improve the exception handling on the server side.
And we'll need to do something along the lines of Exception logging, and recording an exception count and datetime so an Admin is sent a message whenever they connect or are connected.
"1 new exception occurred in the Admin mod since you last logged in. Please see the Admin mod log file for details."
"A new exception occurred in the Admin mod. Please see the Admin mod log file for details."