Skip to content

Logging Routine

July 1, 2008

I created a routine, LogData,  that is pretty simple, it accepts two parameters:

  • intCode
  • strMessage

I use this routine to log when the script starts and stops as well as a basic error handling routine. When I’m using it to handle errors, the strMessage variable is usually a combination of Err.Number, Err.Description as well as text that might say what I wanted to have happen when the error occurred.


This is an integer between 0 and 4 that determines the icon that will appear in the Application log on a Windows based computer.

  • 0 = Success
  • 1 = Error
  • 2 = Warning
  • 3 = Information


This is a string variable that holds the body of the message, usually in my scripts this is built in another function.


From → Scripting

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: