Hi,
There are a lot of log files, you can find logs for your exceptions in your application in the exception.log.
file located at
Your-web-Root\WEB-INF\lucee\logs
and tomcat\lucee-server\context\logs
.
A better idea is to use onerror in the ‘application.cfc’ file to specify the location where you want your logs.
component {
// Define your application settings here
this.name = "MyApplication";
this.sessionManagement = true;
// Other settings...
// Define the onError function to handle exceptions
function onError(exception, eventname) {
// Log the exception details to a file or database
// For example, you can use cflog to log to a file
cflog(file="error", text="An error occurred: #exception.message#");
// Optionally, you can also display a user-friendly error message
// to the end user
writeOutput("An unexpected error occurred. Please try again later.");
// Return true to prevent the default error handler from executing
return true;
}
}