Windows Service stops updating event log
I've got a small project that involves a windows service. The service is still in the development stages so I'm using the Application event log to keep track of what it's doing. There's a lot of messages that get sent to the log right now (and yes, I know there's better ways to log but for this work, the EventLog is quick and easy).
At some point however, my messages just stopped. The service was still running yet I wasn't getting any messages. I was puzzled as to what could be wrong. I checked the properties of the Application log to make sure the log size was big enough. It was set at 512 KB which I thought was big enough, but the setting for what to do when the log size is reached was still set at "Overwrite events older than 7 days":
I had been doing so much logging, I had filled up the log, but none of the entries were over 7 days old -- so the calls to add log entries were just being ignored. I changed the log settings to "Overwrite as needed" and I stopped losing log entries. Now I know I'm not going crazy!