0
Windowsイベントビューアがイベントビューアに期待通りにログに記録されません。WindowsイベントビューアC#で特定のログがありません
public class Eventlog : LogDate
{
public void logEvent(string answer)
{
this.localDate = new DateTime();
try
{
string sSource;
string sLog;
string sEvent;
sSource = "dotNET Sample App";
sLog = "filmdatabase";
sEvent = answer;
if (!EventLog.SourceExists(sSource))
{
EventLog.CreateEventSource(sSource, sLog);
}
EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Error, 234, 1);
}
catch (Exception exc)
{
MessageBox.Show("Oops! Something went wrong trying to log. \n\n" + exc , "Filmdatabase Error");
}
}
}
}
私がログインしようとして、それだけでログに記録します。データベース 'db_film' を起動しています。 アプリケーションのエラーと警告の代わりに。 typen DUSのhierのHEBのJEのminimaal 30文字
愚かな質問ですが、あなたはイベントビューアの正しい場所を探していますか?アプリケーションとサービスのログ/ filmdatabase? –
ありがとう、私はとても愚かな –