문제

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