目前,我有一个用于自定义创建的事件日志的资源文件。当我出于信息/成功目的将事件写入日志时,一切似乎都运行良好。但是当我写一个错误意图时,我得到......
无法找到来自源 X 的事件 ID 301 的描述...
我想知道...这是否与我的所有类别都是严重性 = 成功的事实有关?我是否还需要具有 Severity=Error 的服务类别?
成功的日志条目示例:
事件 ID:101,级别:信息,任务类别:(8) 服务
NON 成功的日志条目示例:
事件 ID:301,级别:错误,任务类别:(8) 服务
以下是我当前的文本消息文件,我将其转换为类别和消息的资源文件...
; // EventLogMsgs.mc
; // ********************************************************
; // Use the following commands to build this file:
; // mc -s EventLogMsgs.mc
; // rc EventLogMsgs.rc
; // link /DLL /SUBSYSTEM:WINDOWS /NOENTRY /MACHINE:x86 EventLogMsgs.Res
; // ********************************************************
; // - Event categories -
; // Categories must be numbered consecutively starting at 1.
; // ********************************************************
MessageId=0x1
Severity=Success
SymbolicName=GENERAL_CATEGORY
Language=English
General
.
MessageId=0x2
Severity=Success
SymbolicName=DATABASE_CATEGORY
Language=English
Database Query
.
MessageId=0x3
Severity=Success
SymbolicName=LOGON_CATEGORY
Language=English
Logon
.
MessageId=0x4
Severity=Success
SymbolicName=LOGOFF_CATEGORY
Language=English
Logoff
.
MessageId=0x5
Severity=Success
SymbolicName=EMAIL_CATEGORY
Language=English
Email
.
MessageId=0x6
Severity=Success
SymbolicName=PRINTER_CATEGORY
Language=English
Printer
.
MessageId=0x7
Severity=Success
SymbolicName=IO_CATEGORY
Language=English
IO
.
MessageId=0x8
Severity=Success
SymbolicName=SERVICE_CATEGORY
Language=English
Service
.
MessageId=0x9
Severity=Success
SymbolicName=DEBUG_CATEGORY
Language=English
Debug
.
; // - Event messages -
; // *********************************
MessageId = 100
Severity = Success
Facility = Application
SymbolicName = SMESSAGE_ID100
Language=English
%1
.
MessageId = 101
Severity = Success
Facility = Application
SymbolicName = SMESSAGE_ID101
Language=English
%1
.
MessageId = 102
Severity = Success
Facility = Application
SymbolicName = SMESSAGE_ID102
Language=English
%1
.
MessageId = 103
Severity = Success
Facility = Application
SymbolicName = SMESSAGE_ID103
Language=English
%1
.
MessageId = 104
Severity = Success
Facility = Application
SymbolicName = SMESSAGE_ID104
Language=English
%1
.
MessageId = 105
Severity = Success
Facility = Application
SymbolicName = SMESSAGE_ID105
Language=English
%1
.
MessageId = 200
Severity = Warning
Facility = Application
SymbolicName = WMESSAGE_ID200
Language=English
%1
.
MessageId = 201
Severity = Warning
Facility = Application
SymbolicName = WMESSAGE_ID201
Language=English
%1
.
MessageId = 202
Severity = Warning
Facility = Application
SymbolicName = WMESSAGE_ID202
Language=English
%1
.
MessageId = 203
Severity = Warning
Facility = Application
SymbolicName = WMESSAGE_ID203
Language=English
%1
.
MessageId = 204
Severity = Warning
Facility = Application
SymbolicName = WMESSAGE_ID204
Language=English
%1
.
MessageId = 205
Severity = Warning
Facility = Application
SymbolicName = WMESSAGE_ID205
Language=English
%1
.
MessageId = 300
Severity = Error
Facility = Application
SymbolicName = EMESSAGE_ID300
Language=English
%1
.
MessageId = 301
Severity = Error
Facility = Application
SymbolicName = EMESSAGE_ID301
Language=English
%1
.
MessageId = 302
Severity = Error
Facility = Application
SymbolicName = EMESSAGE_ID302
Language=English
%1
.
MessageId = 303
Severity = Error
Facility = Application
SymbolicName = EMESSAGE_ID303
Language=English
%1
.
MessageId = 304
Severity = Error
Facility = Application
SymbolicName = EMESSAGE_ID304
Language=English
%1
.
MessageId = 305
Severity = Error
Facility = Application
SymbolicName = EMESSAGE_ID305
Language=English
%1
.