How do I configure the IDE to put logs and other files in separate project folders?
Estimated Reading Time: 2 Minutes
Question:
By default, trace logs and data files are created in my project's output folder. How do I configure the IDE to put these and other files in separate project folders?
Answer:
When running or debugging the isCOBOL IDE sets the current working directory to the project's output folder. This explains why your log files are getting written there. You can specify directories for log files, compiler error and listing files, and even data files in your project as follows:
- Set the iscobol.logfile property to specify the directory where trace log files are written
- Set the iscobol.file.prefix property to specify the directory where data files are opened
- Use the -eo compiler option to specify the directory where compiler error files are written
- Use the -lo compiler option to specify the directory where compiler listing files are written
iscobol.tracelevel=31
iscobol.logfile=../logs/iscobol.log
Add "errors" and "listings" folders to your project and then add the following compiler options:
-ef -eo=errors -lf -lo=listings
Add a "data" folder to your project and then add the following to your properties file:
iscobol.file.prefix=../data
The reason to specify "../" in folder names in the properties file is because these folders are one level up from the current working directory when the program runs (i.e. the parent of the output folder), and using "../" allows you to move your project to a different folder without requiring a change to your properties file.