i have got a logfile created like this:
output stream error-s to value(lc-pathdir + "import-errors-" +
string(today,"999999":u) + "-" + string(li-time /* ,"HH:MM:SS" */ ) +
".log"). /*creating the log file in the specified directory
with the time string in the file name*/
i would like to show an error alert box if any line is created in the logfile, otherwise a different alert box will be displayed...
so what function can be used to check if any line was created in the logfile...???
Not sure what you are trying to accomplish but you can use a counter to check the number of messages written to the logfile or if you have to check the logfile from another program maybe you can use file-info:file-size to check the for file size > 0?
The tricky thing here could be where you have closed the file or not after writing the message. If you haven't, then buffered output may not have yet been written to disk. I would try file-info or seek, but it would be safer to make sure the file is closed first. Of course, my preferred approach would be to use another mechanism to record this state change, something internal to the application. E.g., I would put the logging code in a PP, SP, or object which was called whenever you needed to write to the log, but such object could also retain state without having to check the output file itself. You might get some ideas from http://www.oehive.org/ExceptionClass