×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Write Log

Write Log

Write Log

(OP)

I'm trying to understand what's happening in an inherited vb project and would like to be able to track what the code is doing. With Access VBA I'd just add break points and step through the code.

This project creates a log file to do something similar and these two examples seem to be doing this in part.

general.writeLog("Mode: n/a, CachedID: n/a, Scanned: " & scanCode & _
", Error: invalid code read, invalid gun id.", 2)

general.writeLog("Mode: " & gunArray(gunID).listeningMode & ", cachedID: " & gunArray(gunID).cachedID & ", Scanned: F" & scanCodesub & _
", Action: Cask Not Full", 1)

I'd like to add new writes to the log file at particular points in the code but don't know what they should contain. For example
    I can't find anything in a Google search on general.writelog
    I'm not clear what the parameters 1 and 2 do
    I'm also not clear how many parameters are needed altogether and if there are column headings somewhere
Sorry to be vague here but some pointers as to where to look would be helpful.


RE: Write Log

general.writelog sounds like it could be a procedure named writelog in a module named general, so look for that.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!

RE: Write Log

"With Access VBA I'd just add break points and step through the code"
Well, why don't you do the same in VB.NET? You can do it here as well, you know...

Have fun.

---- Andy

There is a great need for a sarcasm font.

RE: Write Log

(OP)

Thanks jebenson, you're right, there is a clsGeneralFuncs with things in it including writelog. The second parameter is an integer status, so I need to find what it refers to.

I can't seem to run a copy of the entire application on my home computer for debugging, because in normal use it responds to a barcode reader entering data via a COM port. Don't have one so haven't found a way of getting the bits of vb code to run that I need to work on.

And thanks Andy, see that setting a breakpoint is just the same as in VBA, just need to be able to trigger the code to run, as above.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close