Skip to content

Instantly share code, notes, and snippets.

Created October 2, 2018 22:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
'Within the "Public Class MAExtensionObject" section, add:
'Date & Logginglevel variables for logging files:
Dim dtDateNowDay As Integer = Date.Now.Day
Dim dtDateNowMonth As Integer = Date.Now.Month
Dim dtDateNowYear As Integer = Date.Now.Year
Dim loggingLevel As Integer = 0
'With the Sub or Function that you want logging - e.g. "Public Sub MapAttributesForImport"
Dim dtFileTime As DateTime
'Define Logfile Name then setup the logfile
Dim logFileName As String = dtDateNowDay & "-" & dtDateNowMonth & "-" & dtDateNowYear & "_MyMA_Import.log"
Logging.SetupLogFile(logFileName, loggingLevel)
'Within a sync rule, where you want to log something - e.g. what the UPN is going to be set to:
Logging.Log("Some informational string," & csentry("samAccountName").Value & ",UPN," & csentry("mail").Value, True, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment