For debugging purposes, how can I print to the event log/viewer in DotNetNuke, using VB.NET or C#?
Also, if you want to add more data to the log, you can use LogInfo class to add events to the log.
Dim eventLog As EventLogController
eventLog = New EventLogController()
Dim logInfo As DotNetNuke.Services.Log.EventLog.LogInfo
logInfo = New LogInfo()
logInfo.LogUserID = UserId
logInfo.LogPortalID = PortalSettings.PortalId
logInfo.LogTypeKey = EventLogController.EventLogType.ADMIN_ALERT.ToString()
logInfo.AddProperty("PropertyName1", propertyValue1)
logInfo.AddProperty("PropertyName2", propertyValue2)
eventLog.AddLog(logInfo)