gpt4 book ai didi

c# - 如何使用 WriteEvent 将事件记录为 Critical

转载 作者:可可西里 更新时间:2023-11-01 10:49:13 25 4
gpt4 key购买 nike

我正在尝试使用以下方法将事件级别设置为严重:

WriteEvent(id, categoryName, EventSeverity.ErrorCritical, entry);

但是在事件日志中它只显示事件级别为错误而不是严重。我还需要设置其他配置和参数吗?

最佳答案

您是说 Microsoft.SharePoint.Administration.EventSeverity 吗?它由 ShP 使用并映射到它自己的事件日志。

使用映射到 Windows 事件日志的 System.Diagnostics.EventLogEntryType 的正确方法:

Error
Warning
Information
SuccessAudit
FailureAudit

关于c# - 如何使用 WriteEvent 将事件记录为 Critical,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11648682/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com