TN 038 - Setting a Project’s Log File to “Debug” Mode
Tech Note – May 25, 2023
Setting a Project’s Log File to “Debug” Mode – TN38
Dream Report has a built-in service to log information and messages relative to the running project. This log file is useful in debugging or auditing a project. The log file configuration is specified in Dream Report Studio under Project Settings > Log File. The log file is created in a .csv format, which can be opened with a text editor or Excel. By default, the log file is named as according to the project name - <Project_Name>.csv – and is located in the project folder.
There are two options available which set the level of detail written to the log file – Normal and Debug modes. Normal is the default, and includes messages like the project starting up or shutting down, license information, report generation starting and completing, etc. Should you need to troubleshoot a report/project with a greater level of detail, the log file should be put into Debug mode – this will then log every query issued in a report, detailed error messages returned from data sources, etc. Since the size of a log file in Debug mode will grow quickly, we recommend leaving the logger in Normal mode under typical operation, and only set it to Debug temporarily while troubleshooting a specific issue.
How to Enable Debug Mode
Set the log file to Debug mode if you need to leave the project in Debug mode over a period of time – e.g., when looking for a specific issue that happens intermittently, or to maintain Debug mode over restarts of the project. In Studio, open the Project > Log File settings:
Set the Level for project log messages to “Debug”, and also ensure that “Use multi-session log file” is checked (this will ensure that log messages are appended to the existing log file whenever the project is reloaded, as opposed to deleting and creating a new file each time.) Save and reload the project for this setting to take effect. Don’t forget to change this setting back to Normal mode after your issue is resolved.
If your project’s log file is set to Normal mode, but you want to temporarily enable Debug mode at runtime – e.g., if you need to capture detailed log messages for a single generation of a report – you can set this in the Runtime Management Console (RMC). Under the PROJECT ACCESS section, select “Set Debug level of log messages”:
Then, select and generate the specific report.
You can open the log file to view the detailed log messages by selecting “Open log file” in the RMC (“1.” above), which will open the file in the default text file editor; or, if you need to copy the entire log file (e.g., to send to Tech Support), select “Open log file folder” (“2.” above). To set the log file back to the “normal” mode, select “Set Normal level of log messages” under the PROJECT ACCESS section (“3.” above).
Please refer to the Dream Report Help file or User Manual under Project Settings > Log File Settings for additional information.