-1

我有一个用经典 ASP 编写的自定义 404 页面。我正在尝试设置当页面被点击时,它应该通过 syslog 发送日志。我怎么写出来?

4

1 回答 1

0

您可以使用以下方法从 Classic ASP 记录事件:

dim WshShell
set WshShell = Server.CreateObject("WScript.Shell")
wshshell.Logevent 1, "Page not found - your message here!"
set wshshell=nothing

您可以在MSDN - Logging Events from ASP上找到更多详细信息,例如不同的警告级别。

于 2012-12-13T17:36:43.257 回答