# EnableLogging
`Get|Let {Boolean}`
启用从VBA-Web记录请求和响应以及其他内部消息。 如果某些内容无法按预期工作,那么应该是调试VBA-Web的第一步。 (日志显示在立即窗口中(`查看>立即窗口`或`ctrl + g`)
~~~vb
Dim Client As New WebClient
Client.BaseUrl = "https://api.example.com/v1/"
Dim RequestWithTypo As New WebRequest
RequestWithTypo.Resource = "peeple/{id}"
RequestWithType.AddUrlSegment "idd", 123
'// 在执行请求之前启用日志记录
WebHelpers.EnableLogging = True
Dim Response As WebResponse
Set Response = Client.Execute(Request)
'// Immediate window:
'// --> Request - (Time)
'// GET https://api.example.com/v1/peeple/{id}
'// Headers...
'//
'// <-- Response - (Time)
'// 404 ...
~~~
- README
- 指南
- 概述
- GET Request
- WebRequest
- 属性
- Resource
- Method
- Body
- Format
- RequestFormat
- ResponseFormat
- CustomRequestFormat
- CustomResponseFormat
- ContentType
- Accept
- ContentLength
- FormattedResource
- Cookies
- Headers
- QuerystringParams
- UrlSegments
- 方法
- AddHeader
- SetHeader
- AddUrlSegment
- AddQuerystringParam
- AddCookie
- AddBodyParameter
- CreateFromOptions
- WebClient
- 属性
- BaseUrl
- Authenticator
- TimeoutMs
- ProxyServer
- ProxyBypassList
- ProxyUsername
- ProxyPassword
- EnableAutoProxy
- Insecure
- FollowRedirects
- 方法
- Execute
- GetJson
- PostJson
- SetProxy
- GetFullUrl
- WebResponse
- 属性
- StatusCode
- StatusDescription
- Content
- Data
- Body
- Headers
- Cookies
- 方法
- Update
- WebHelpers
- 属性
- WebStatusCode
- WebMethod
- WebFormat
- UrlEncodingMode
- EnableLogging
- 方法
- LogDebug
- LogWarning
- LogError
- LogRequest
- LogResponse
- Obfuscate
- ParseJson
- ConvertToJson
- ParseUrlEncoded
- ConvertToUrlEncoded
- ParseXml
- ConvertToXml
- ParseByFormat
- ConvertToFormat
- UrlEncode
- UrlDecode
- Base64Encode
- Base64Decode
- RegisterConverter
- JoinUrl
- UrlParts
- CloneDictionary
- CloneCollection
- CreateKeyValue
- FindInKeyValues
- AddOrReplaceInKeyValues
- FormatToMediaType
- MethodToName
- HMACSHA1
- HMACSHA256
- MD5
- CreateNonce
- IWebAuthenticator
- 方法
- BeforeExecute
- AfterExecute
- PrepareHttp
- PrepareCurl
- WebAsyncWrapper
- 属性
- Client
- 方法
- ExecuteAsync
- 范例
- Salesforce网站
- Google APIs
- Todoist API
- 其他主题
- 调试
- 授权
- 实现自己的IWebAuthenticator
- Url编码