草庐IT

eventLog

全部标签

mysql - MAMP:MySQL 无法启动(无法打开 Windows EventLog)

当我在Windows10上启动MAMP时,它无法启动MySQL。昨天MAMP可以启动数据库服务器,但今天不能。我打开了mySQL日志(C:\MAMP\logs\mysql_error_log.err)来查看发生了什么,我看到了这个:2019-03-03T12:37:02.179451Z0[Note]--secure-file-privissettoNULL.Operationsrelatedtoimportingandexportingdataaredisabled2019-03-03T12:37:02.180417Z0[ERROR]CannotopenWindowsEventLog;

c# - 尝试在 .NET 中使用 EventLog.SourceExists 方法时出现问题

我正在尝试使用C#在我的应用程序中使用事件日志,因此我添加了以下代码if(!EventLog.SourceExists("SomeName"))EventLog.CreateEventSource("SomeName","Application");EventLog.SourceExists导致SecurityException说“未找到来源,但无法搜索到部分或所有事件日志。不可访问的日志:安全。”我在Windows7中以管理员身份运行。如有任何帮助,我们将不胜感激。 最佳答案 这是一个权限问题-您应该授予运行用户读取以下注册表项的

c# - 尝试在 .NET 中使用 EventLog.SourceExists 方法时出现问题

我正在尝试使用C#在我的应用程序中使用事件日志,因此我添加了以下代码if(!EventLog.SourceExists("SomeName"))EventLog.CreateEventSource("SomeName","Application");EventLog.SourceExists导致SecurityException说“未找到来源,但无法搜索到部分或所有事件日志。不可访问的日志:安全。”我在Windows7中以管理员身份运行。如有任何帮助,我们将不胜感激。 最佳答案 这是一个权限问题-您应该授予运行用户读取以下注册表项的

c# - EventLog.CreateEventSource 未创建自定义日志

我有这样的代码:EventLog.CreateEventSource("myApp","myAppLog");EventLog.WriteEntry("myApp","Testlogmessage",EventLogEntryType.Error);现在,除非我在阅读MSDN时遗漏了一些内容,否则这应该会导致在事件查看器中创建一个新日志“myAppLog”,并且应该向该新日志添加一个源名称为“myApp”的条目。但是,我无法创建新日志。这总是只是将错误日志消息写入应用程序日志,源“myApp”-“myAppLog”无处可见。我究竟做错了什么?我以管理员身份登录。

c# - EventLog.CreateEventSource 未创建自定义日志

我有这样的代码:EventLog.CreateEventSource("myApp","myAppLog");EventLog.WriteEntry("myApp","Testlogmessage",EventLogEntryType.Error);现在,除非我在阅读MSDN时遗漏了一些内容,否则这应该会导致在事件查看器中创建一个新日志“myAppLog”,并且应该向该新日志添加一个源名称为“myApp”的条目。但是,我无法创建新日志。这总是只是将错误日志消息写入应用程序日志,源“myApp”-“myAppLog”无处可见。我究竟做错了什么?我以管理员身份登录。

c# 写入事件查看器

我试图在我的C#代码中写入事件查看器,但我收到了美妙的消息“对象引用未设置为对象的实例”。我很感激这段代码的一些帮助,无论是它有什么问题,甚至是更好的方法。这是我要写入事件日志的内容:privatevoidWriteToEventLog(stringmessage){stringcs="QualityDocHandler";EventLogelog=newEventLog();if(!EventLog.SourceExists(cs)){EventLog.CreateEventSource(cs,cs);}elog.Source=cs;elog.EnableRaisingEvents=

c# 写入事件查看器

我试图在我的C#代码中写入事件查看器,但我收到了美妙的消息“对象引用未设置为对象的实例”。我很感激这段代码的一些帮助,无论是它有什么问题,甚至是更好的方法。这是我要写入事件日志的内容:privatevoidWriteToEventLog(stringmessage){stringcs="QualityDocHandler";EventLogelog=newEventLog();if(!EventLog.SourceExists(cs)){EventLog.CreateEventSource(cs,cs);}elog.Source=cs;elog.EnableRaisingEvents=

android - 不使用 Observable.create 创建 Observable

我在我的Android应用程序中使用RxJava,我想从数据库中加载数据。这样,我使用Observable.create()创建一个新的Observable,它返回EventLog的列表publicObservable>loadEventLogs(){returnObservable.create(newObservable.OnSubscribe>(){@Overridepublicvoidcall(Subscriber>subscriber){Listlogs=newSelect().from(DBEventLog.class).execute();ListeventLogs=ne

android - 不使用 Observable.create 创建 Observable

我在我的Android应用程序中使用RxJava,我想从数据库中加载数据。这样,我使用Observable.create()创建一个新的Observable,它返回EventLog的列表publicObservable>loadEventLogs(){returnObservable.create(newObservable.OnSubscribe>(){@Overridepublicvoidcall(Subscriber>subscriber){Listlogs=newSelect().from(DBEventLog.class).execute();ListeventLogs=ne

c# - EventLog 记录在应用程序中,即使设置为另一个日志

我在我的应用程序中创建了一个EventLog对象,我用它来记录我自己的日志,创建方式如下:if(!System.Diagnostics.EventLog.SourceExists("MyApplication")){System.Diagnostics.EventLog.CreateEventSource("MySource","MyApplication");}eventLog.Source="MySource";eventLog.Log="MyApplication";我这样记录条目:eventLog.WriteEntry("somelogline");当检查eventLog对象时