Sienn Forum
»
Example Cases
»
Creating Packages
»
Easy debug source in packages, write to a logfile
Rank: Sienn Developer
Groups: Administration
Joined: 10/8/2008(UTC) Posts: 23
|
Simple add this sub to your source function, set a global class in the header for turning logging on and of. In the header: Code:Public Class Elogaan
public const ErrorLogAan as boolean = true
End Class
==>END IMPORTS
In the functions: Code:Sub writeLog(ByVal LogFileName as string,ByVal Value as string)
if Elogaan.ErrorLogAan then
Dim Logfile As system.io.StreamWriter
Logfile = system.io.File.AppendText(LogFileName)
Logfile.WriteLine(Value & microsoft.visualbasic.vbcrlf)
Logfile.Close()
end if
End Sub
Use in the source something like: Code:writelog(LogFileName,"Start:" & microsoft.visualbasic.now.hour.tostring & microsoft.visualbasic.now.minute.tostring)
If you change the boolean in the Class it will or will not write in a log file. Edited by user Thursday, June 18, 2009 3:00:00 PM(UTC)
| Reason: Not specified
|
|
|
|
Sienn Forum
»
Example Cases
»
Creating Packages
»
Easy debug source in packages, write to a logfile
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The Sienn Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close