简体   繁体   English

Azure Windows事件日志级别

[英]Azure Windows Eventlog Level

I can't find something helpful anywhere... How do the raw Windows Azure: Windows Event Log-XML looks like. 我无法在任何地方找到有用的东西......原始Windows Azure:Windows事件日志-XML如何。 I need to know which EventLevel refers to an number. 我需要知道哪个EventLevel引用了一个数字。

Thanks 谢谢

If you're talking about an XML file I'm assuming you are referring to the diagnostics.wadcfg file. 如果您正在谈论XML文件,我假设您指的是diagnostics.wadcfg文件。 In this file, you simply write the LogLevel as defined in the XSD: 在此文件中,您只需编写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>

If you need the numeric values of each level (I think this is also something you're asking), you can find them through the enum: 如果你需要每个级别的数值(我想这也是你要问的),你可以通过枚举找到它们:

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,
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM