PDA

View Full Version : Suggestion: SetupData.WriteToLogFile with new optional parameter Filename, Linenumber



SetupJuggler
10-02-2009, 08:53 AM
Hi,

I have a lot of script files included, and for debugging I place SetupData.WriteToLogFile() into the scripts. To find this line in source code I also place the filename and the function name with the error text. This is not convenient.

It would be a big deal, if SetupData.WriteToLogFile also logs the filename and the line number where the function was called into the log file. In the main project file the function could log the project event.

log file example for MyFile.lua script file and SetupData.WriteToLogFile called in line 133
[10/02/2009 13:22:55 MyFile.lua 133] Error My error message
or for the main project:
[10/02/2009 13:22:55 On Post Install 133] Error My error message


Function prototype like this, to have compatibility:



SetupData.WriteToLogFile(string Text,
boolean AddTimestamp = true,
AddFilename = false,
AddLinenumber = false )


Or for not to have three parameters use a table:





SetupData.WriteToLogFile( string Text,
table Properties = nil )


Properties (table)
AddTimestamp boolean
AddFilename boolean
AddLinenumber boolean

Best regards,
Udo

Darryl
05-20-2010, 11:02 AM
Thanks for the suggestion.
REF: SUFSUG-2