logo
Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Sjarl  
#1 Posted : Wednesday, June 17, 2009 2:38:24 PM(UTC)
Sjarl

Rank: Sienn Developer

Reputation:

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

Wanna join the discussion?! Login to your Sienn Forum forum account. New Registrations are disabled.

Users browsing this topic
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.