Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write Log

Status
Not open for further replies.

TrekBiker

Technical User
Nov 26, 2010
330
0
0
GB

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
[ul]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
[/ul]

Sorry to be vague here but some pointers as to where to look would be helpful.


 
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!
 
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.
 

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top