I have made a error logging class which simply just writes to a text file. the mthod is called "log(text as string)"
The user has a option to "add timestamp" to begining of each line.
Instead of doing if statements on every exception, or activity to see if I should send the string with a timestamp or not, cant I just put the if statement in my class method?
for ex:
Code:Public Class Sub log(text as string) if my.settings.addTimeStamp = true then 'add time else 'leave it end if 'log it end sub end Clas




Reply With Quote