private void Error(string message, params Object[] args)
{
// If we are running in service mode, then
// send the message to the event log, otherwise
// forward to the console.
if (_eventLog == null)
{
Console.WriteLine("E:" + message, args);
}
else
{
string finalMessage = String.Format(message, args);
_eventLog.WriteEntry(finalMessage, EventLogEntryType.Error);
}
}