【问题标题】:Azure Windows Eventlog LevelAzure Windows 事件日志级别
【发布时间】:2012-11-30 08:04:25
【问题描述】:

我在任何地方都找不到有用的东西...原始的 Windows Azure:Windows 事件日志 XML 看起来如何。我需要知道哪个 EventLevel 指的是一个数字。

谢谢

【问题讨论】:

    标签: c# xml events azure diagnostics


    【解决方案1】:

    如果您谈论的是 XML 文件,我假设您指的是 diagnostics.wadcfg 文件。在此文件中,您只需编写 XSD 中定义的 LogLevel:

      <xs:simpleType name="LogLevel">
        <xs:restriction base="xs:string">
          <xs:enumeration value="Undefined" />
          <xs:enumeration value="Verbose" />
          <xs:enumeration value="Information" />
          <xs:enumeration value="Warning" />
          <xs:enumeration value="Error" />
          <xs:enumeration value="Critical" />
        </xs:restriction>
      </xs:simpleType>
    

    如果你需要每个级别的数值(我想这也是你要问的),你可以通过枚举找到它们:

    namespace Microsoft.WindowsAzure.Diagnostics
    {
        // Summary:
        //     Defines a standard set of logging levels.
        public enum LogLevel
        {
            // Summary:
            //     Logs all events at all levels.
            Undefined = 0,
            //
            // Summary:
            //     Logs a critical alert.
            Critical = 1,
            //
            // Summary:
            //     Logs an error.
            Error = 2,
            //
            // Summary:
            //     Logs a warning.
            Warning = 3,
            //
            // Summary:
            //     Logs an informational message.
            Information = 4,
            //
            // Summary:
            //     Logs a verbose message.
            Verbose = 5,
        }
    }
    

    【讨论】:

    • 非常感谢。这就是我搜索的:)
    猜你喜欢
    • 1970-01-01
    • 2015-05-15
    • 1970-01-01
    • 2020-06-24
    • 1970-01-01
    • 2022-11-10
    • 1970-01-01
    • 2012-02-27
    • 1970-01-01
    相关资源
    最近更新 更多