سؤال

I can't find something helpful anywhere... How do the raw Windows Azure: Windows Event Log-XML looks like. I need to know which EventLevel refers to an number.

Thanks

هل كانت مفيدة؟

المحلول

If you're talking about an XML file I'm assuming you are referring to the diagnostics.wadcfg file. In this file, you simply write the LogLevel as defined in the XSD:

  <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 مع الإسناد
لا تنتمي إلى StackOverflow
scroll top