Jump to content

Lars Fosdal

Administrators
  • Content Count

    3344
  • Joined

  • Last visited

  • Days Won

    111

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?


  3. DP may be willing to open sub-forums for other Delphi Communities on Google+, to grow the community even more.  

     

    If you currently operate a Delphi related Community on Google+, or a mailing list, or other user-facing solutions elsewhere - and would be interested in relocating here, please get in touch with @Daniel to find out what can be done.

    • Like 1

  4. Thank you, Daniel, for opening the International Delphi-PRAXiS forums for the G+ Delphi Developer refugees! In my opinion, this is the best possible outcome from having to leave G+. We strengthen as a community, and get access to a properly managed, fast, independent, ad-free forum with proper formatting of source code, RSS support, good UI and that actually works well on mobile too!

    I am a happy coder today!

    • Like 4
×