HttpLoggingSection Class1
HTTP 요청의 로깅을 구성합니다.
구문
class HttpLoggingSection : ConfigurationSection
메서드
다음 표에서는 클래스에서 노출하는 메서드를 나열합니다 HttpLoggingSection
.
속성 | Description |
---|---|
GetAllowDefinition | ( ConfigurationSection에서 상속됩니다.) |
GetAllowLocation | ConfigurationSection 에서 상속됩니다. |
RevertToParent | ConfigurationSection 에서 상속됩니다. |
SetAllowDefinition | ConfigurationSection 에서 상속됩니다. |
SetAllowLocation | ConfigurationSection 에서 상속됩니다. |
속성
다음 표에서는 클래스에서 노출하는 속성을 나열합니다 HttpLoggingSection
.
속성 | Description |
---|---|
DontLog |
읽기/쓰기 boolean 값입니다. true 성공적인 요청에 대해 로깅을 사용하지 않도록 설정하면 이고, false 성공한 요청이 기록되면 입니다. 상태 코드가 400보다 작은 경우 요청이 성공한 것으로 간주됩니다. 기본값은 false 입니다. 참고: 이 속성은 IIS 6.0의 DontLog 메타베이스 속성과 동일합니다. |
Location |
(에서 ConfigurationSection 상속됨) 키 속성입니다. |
Path |
(에서 ConfigurationSection 상속됨) 키 속성입니다. |
SectionInformation |
ConfigurationSection 에서 상속됩니다. |
SelectiveLogging |
sint32 기록할 이벤트를 지정하는 열거형입니다. 가능한 값은 설명 섹션의 뒷부분에 나열됩니다. |
를 서브클래싱합니다.
이 클래스에는 하위 클래스가 없습니다.
설명
이 클래스는 ApplicationHost.config 파일의 섹션에 해당합니다 <system.webServer/httpLogging>
.
다음 표에서는 속성에 대해 가능한 값을 나열합니다 SelectiveLogging
. 기본값은 0(LogAll
)입니다.
값 | 키워드 | Description |
---|---|---|
0 | LogAll |
모든 요청이 기록됩니다. |
1 | LogSuccessful |
성공한 요청만 기록됩니다. 상태 코드가 400보다 작은 경우 요청이 성공한 것으로 간주됩니다. |
2 | LogError |
실패한 요청만 기록됩니다. 상태 코드가 400보다 크거나 같은 경우 요청이 실패한 것으로 간주됩니다. |
예제
다음 코드 예제에서는 합니다 SelectiveLogging
속성을 LogError
입니다.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject( _
"winmgmts:root\WebAdministration")
' Get the HTTP logging section.
Set oSection = oWebAdmin.Get( _
"HttpLoggingSection.Path=" & _
"'MACHINE/WEBROOT/APPHOST',Location=''")
' Display the class name of the section.
WScript.Echo "[ " & oSection.Path_.Class & " ]" & vbCrLf
' Display the initial settings.
Call DisplaySettings("Initial Values", oSection)
' Set the SelectiveLogging property to LogError.
oSection.SelectiveLogging = 2
' Save new values to configuration.
oSection.Put_
' Refresh the oSection object variable with new values.
oSection.Refresh_
' Show changed settings.
Call DisplaySettings("New Values", oSection)
' ==== DisplaySettings helper function. ====
Function DisplaySettings(HeadingText, oSection)
' Display a heading.
WScript.Echo String(Len(HeadingText), "-")
WScript.Echo HeadingText
WScript.Echo String(Len(HeadingText), "-")
' Display configuration history section properties.
WScript.Echo "Path: " & oSection.Path
WScript.Echo "Location: " & oSection.Location
WScript.Echo "DontLog: " & oSection.DontLog
WScript.Echo "SelectiveLogging: " & _
oSection.SelectiveLogging
WScript.Echo
End Function
상속 계층 구조
HttpLoggingSection
요구 사항
형식 | Description |
---|---|
클라이언트 | - Windows Vista의 IIS 7.0 - Windows 7의 IIS 7.5 - Windows 8의 IIS 8.0 - WINDOWS 10 IIS 10.0 |
서버 | - Windows Server 2008의 IIS 7.0 - Windows Server 2008 R2의 IIS 7.5 - Windows Server 2012의 IIS 8.0 - Windows Server 2012 R2의 IIS 8.5 - WINDOWS SERVER 2016 IIS 10.0 |
제품 | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF 파일 | WebAdministration.mof |
참고 항목
CentralBinaryLogFile 클래스
CentralW3CLogFile 클래스
ConfigurationSection 클래스
OdbcLoggingSection 클래스
LogSection 클래스
SiteLogFile 클래스
DontLog 메타베이스 속성(IIS 6.0)