writing to logfile within the same directory...

Posted by Admin on 26-Feb-2009 21:35

hi..im trying to write a logfile in the 'Logs' folder, which is located within the same directory where the .w and .i files are located....what i have got is this..

output stream error-s to value("propath + "\Logs\import-errors-" +

string(today,"999999":u) + "-" + string(li-time /* ,"HH:MM:SS" */ ) +


/*creating the log file in the specified directory

with the time string in the file name*/

durig runtime it throws an error msg stating it cannot find the location...where am i getting it wrong??


All Replies

Posted by Simon de Kraa on 26-Feb-2009 23:54

Don't use the propath in the output to statement.

Use something like output to value(myroot + "\Logs... instead.

Posted by Thomas Mercer-Hursh on 27-Feb-2009 11:01

Instead of using PROPATH in the name, do a search to obtain the true location of a file and compose the directory path with the result.

Or, better yet, reconsider your design. I dislike the idea of log files being written into source code locations. They should be written to their own logging area.

This thread is closed