Problem:
In the DEV ShipConsole environment, even though the log mode is set to INFO and the log path appears to be correct, the expected ShipConsole.log
file is not being generated.
Findings: Upon checking, the issue was due to a missing trailing slash in the specified log path. As a result, the log file was not written to the expected directory.
Solution:
- Verify the Log Path Configuration
Ensure the path is correctly set with the full directory structure and file name, for example:
/u02/app/appds/apache-tomcat-8.5.28/logs/ShipConsole.log
- Check the Actual Path for Logs
Run the following commands to verify whether the log file exists:
cd /u02/app/appds/apache-tomcat-8.5.28/logs
ls -ltr ShipConsole.log
If the output returns:
ls: cannot access ShipConsole.log: No such file or directory
It confirms the file was not generated due to the incorrect path.
- Update and Restart
- Correct the logging path in the application configuration.
- Restart the ShipConsole service/application.
- Re-trigger logging events and re-check the log file location.
Notes:
Even a small mistake like a missing '/' at the end of the path can cause the log file not to generate.
Always specify the complete path including the filename, not just the directory.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article