在asp中写入syslog的404错误页面

时间:2012-12-13 04:43:44

标签: iis-7 asp-classic syslog

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

1 个答案:

答案 0 :(得分: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上找到更多详细信息,例如不同的警告级别。

相关问题