Its a header file that enables the easy usage of detailed debug logs:
Code: Select all
#PRAGMA ONCE
''To use this you must specify the program's title and version number something like this:
''#INCLUDE "KazuLog.bi"
''progtitle = "ProgramNameHere"
''progversion = "ProgramVersionHere"
Dim Shared As String progtitle, progversion
Dim Shared As Boolean dbmode
#IF __FB_DEBUG__ <> 0
dbmode = true
#ELSE
dbmode = false
#ENDIF
Sub startlog( log_name As String, fnum As ULong )
Open logname For OutPut As #fnum
Open logname For Output As #fnum
Print #fnum, progtitle
Print #fnum, progversion
Print #fnum, ""
Print #fnum, "Compiled with: " & __FB_SIGNATURE__ & " From: " & __FB_BUILD_DATE__
If dbmode = true Then
Print #fnum, " In debug mode"
Else
Print #fnum, " In release mode"
End If
Print #fnum, " On: "; __DATE__; " "; __TIME__
Print #fnum, ""
Print #fnum, " Run time: "; Date; " "; Time
Print #fnum, ""
End Sub
Sub putlog( text As String, fnum As ULong )
Print #fnum, Time; " -"; text
End Sub