我怎样才能在txt中输出?但不在事件日志中
public class ProjectHandler:Microsoft.Office.Project.Server.Events.ProjectEventReceiver {
}
public static void WriteToEventLog(string textLog, EventLogEntryType logtype) {
EventLog eventlog = new EventLog();
eventlog.Source = "Project Event Handler";
eventlog.WriteEntry(logtype.ToString() + ":" + textLog, logtype);
}
public override void OnDeleting(PSContextInfo contextInfo, ProjectPreEventArgs e) {
WriteToEventLog(string.Format("Пользователь \"{0}\" удалил проект \"{1}\"", contextInfo.UserName, e.ProjectName), EventLogEntryType.Information);
base.OnDeleting(contextInfo, e);
}