Jump to content

Lars Fosdal

Administrators
  • Content Count

    3323
  • Joined

  • Last visited

  • Days Won

    110

Posts posted by Lars Fosdal


  1. I have a DebugOut call that I mostly leave in the code as needed.  By default it writes to OutputDebugString, but it also writes to a 4K line buffer internally, and I have patched the system menu to add a "Log to file" option. If the user enables logging to file, it first dumps the 4K line buffer then appends anything else being logged after that.  For server apps, there is a midnight rollover routine that creates a new logfile, and deletes logfiles older than <configurable> days.

    As for adding / removing logging - I can ifdef or comment things in and out by hand, but mostly I just leave it in there, if it is not pure development test code, that is.

    More logging > less logging - when you actually need to figure out what happens.

     

     


  2. I assume you are in control of the output location.

    f.x.

    %somepath%\generated\myimg.png


    What if you create a "signal" file that basically is the URL of your graphics output file with f.x. '.processing' at the end before you start generating the file?
    %somepath%\generated\myimg.png.processing

    Once the processing is complete, you delete the %somepath%\generated\myimg.png.processing

     

    That way, your other process could check if the file %somepath%\generated\myimg.png exists, but continue to wait if there is a %somepath%\generated\myimg.png.processing file there?

×