Dnn's Event Logging API

Logging Provider 存在于 DotNetNuke.Services.Log.EventLog 名称空间下,其中,EventLogControllerExceptionLogController是我们经常用到的两个类,下面是主要的EventLog类型:
Public Enum EventLogType
            USER_CREATED
            USER_DELETED
            LOGIN_SUPERUSER
            LOGIN_SUCCESS
            LOGIN_FAILURE
            CACHE_REFRESHED
            PASSWORD_SENT_SUCCESS
            PASSWORD_SENT_FAILURE
            LOG_NOTIFICATION_FAILURE
            PORTAL_CREATED
            PORTAL_DELETED
            TAB_CREATED
            TAB_UPDATED
            TAB_DELETED
            TAB_SENT_TO_RECYCLE_BIN
            TAB_RESTORED
            USER_ROLE_CREATED
            USER_ROLE_DELETED
            ROLE_CREATED
            ROLE_UPDATED
            ROLE_DELETED
            MODULE_CREATED
            MODULE_UPDATED
            MODULE_DELETED
            MODULE_SENT_TO_RECYCLE_BIN
            MODULE_RESTORED
            SCHEDULER_EVENT_STARTED
            SCHEDULER_EVENT_PROGRESSING
            SCHEDULER_EVENT_COMPLETED
            APPLICATION_START
            APPLICATION_END
            APPLICATION_SHUTTING_DOWN
            SCHEDULER_STARTED
            SCHEDULER_SHUTTING_DOWN
            SCHEDULER_STOPPED
            ADMIN_ALERT
            HOST_ALERT
        End Enum

开发者使用EventLogController.AddLog ()方法来记录日志,它有六种重载,最常用的两个如下:
1、
Public Overloads Sub AddLog(ByVal objCBO As Object, ByVal _PortalSettings As PortalSettings, ByVal UserID As Integer, ByVal UserName As String, ByVal objLogType As Services.Log.EventLog.EventLogController.EventLogType)

此方法主要记录自定义业务对象的属性名称及值
2、
Public Overloads Sub AddLog(ByVal PropertyName As String, ByVal PropertyValue As String, ByVal _PortalSettings As PortalSettings, ByVal UserID As Integer, ByVal objLogType As Services.Log.EventLog.EventLogController.EventLogType)

此方法记录单一属性名称及值

ExceptionLogController的主要ExceptionLog类型有:
Public Enum ExceptionLogType
            GENERAL_EXCEPTION
            MODULE_LOAD_EXCEPTION
            PAGE_LOAD_EXCEPTION
            SCHEDULER_EXCEPTION
        End Enum

此AddLog方法有三个重载
以上信息取自《Professional DotNetNuke Asp.NET Portals 》

posted on 2005-08-09 10:31  andrewma  阅读(1113)  评论(4编辑  收藏  举报