TcLog icon indicating copy to clipboard operation
TcLog copied to clipboard

Should the logger create a Folder to store the text file if logger doesn't exist?

Open paulbarron85 opened this issue 1 year ago • 2 comments

If the folder path doesn't exist it is not created, and the text file is not saved. Is this correct? Should it create the "C:/logs/" because it doesn't on my system. If I manually add C:/logs before running the program it works fine but if the folder isn't there to begin with I get error 1804 for fileOpen.

paulbarron85 avatar Jan 04 '24 16:01 paulbarron85

Hi, thanks for reaching out! Yes, I can reproduce this. The error returned by the logger is

'Opening file failed. Error thrown by FB_FileOpen. Consult Beckhoff InfoSys. Internal Error: 1804'

Creating the directories if they don't exist would be a nice default behavior. I'll look into this 👍

bengeisler avatar Jan 04 '24 22:01 bengeisler

Your library is fantastic, better than mine. By the way folder need to create before running... Creating folder automatically is important

giordanoceccarini avatar Apr 24 '25 14:04 giordanoceccarini