Copy link to clipboard
Copied
I noticed some errors ( for example, undefine varibles) are not logged on one of our coldfusion server. I have checked the settings, and I did not find any difference on the logging settings when i went to admin page. Because of the lack of logging, I have a hard time to debug our application. Can anyone help me? Thanks!
To be clear, there's no connection between the debugging ip address list and the writing of errors to the logs. There's also nothing that makes some errors in a given app get logged but not others (more on that in a moment).
I appreciate you may be grasping at any possible straw. Here are some others to consider:
Copy link to clipboard
Copied
cfconfig export to=C:\Path\to\server1\Config.json from=C:\ColdFusion2021\cfusion\ fromFormat=adobe@2021 excludeList=ACF11Password,ACF11RDSPassword,scheduledTasks,license,previousLicense
cfconfig export to=C:\Path\to\server2\Config.json from=C:\ColdFusion2021\cfusion\ fromFormat=adobe@2021 excludeList=ACF11Password,ACF11RDSPassword,scheduledTasks,license,previousLicense
cfconfig diff from=C:\Path\to\server1\Config.json to=C:\Path\to\server2\Config.json PDFReportPath=C:\Path\to\report\diffs.pdf --ValuesDiffer
Copy link to clipboard
Copied
Thanks for your help. I have tried this, the differences between the exported config:
1 the update site is https, and other one is http ( however, I go to the Administrator page, it is https on both servers).
2 the datasources. This is understandable.
I did not noticed any difference that affect the logging.
Copy link to clipboard
Copied
For discussion of the problem, more information is required.
What are:
Copy link to clipboard
Copied
Our Coldfusion versions are 11. Update Level 19. OS: Windows Server 2016. The directories of the in stallation are the same.
One observation: the one where the logging is not working, but the debug information will print on the .cfm page after my IP is added on the "Debugging IP Address" on Administrator page. The one where the logging does works, but the debug information will not print on the screen; it always goes to the log file.
Copy link to clipboard
Copied
To be clear, there's no connection between the debugging ip address list and the writing of errors to the logs. There's also nothing that makes some errors in a given app get logged but not others (more on that in a moment).
I appreciate you may be grasping at any possible straw. Here are some others to consider:
Sometimes people relying solely on errors appearing in the log are caught out by such error handling which can prevent it.
Please let us know if you confirm the above happening either way.
Copy link to clipboard
Copied
ColdFusion 11 is quite old. So I no longer have access to it. However, I can give you 2 suggestions based on common solutions from recent versions of ColdFusion.
After you implement each suggestion, do the following test to see whether the error is logged.
<!---
Store this line of code as the file loggingTest.cfm.
Launch the file in a browser.
Go to the ColdFusion logs directory.
Examine application.log and coldfusion-out.log in a text editor.
Do they contain the "Division by zero" error message?
--->
<cfset x=1/0>
On the server where logging is not working:
Copy link to clipboard
Copied
Thanks again.
I took your testing cfm file, it printed "An error occurred while executing the application. Please try again or contact the administrator."
After I added my IP to "Debugging IP Addresses", it printed more detail on my screen, and with
Division by zero
I restarted Coldfusion 11 Application server, and the same thing. The log directory is correct.
I do see some message logging into
coldfusion-out.txt, but no "Division by zero" anywhere in the log file or any log files in the log folder:
Feb 16, 2025 07:50:43 AM Information [scheduler-3] - Run Client Storage Purge
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you so much for the help. Sorry, my bad: the log file is coldfusion-out.log.
On the server where error logging did not work, I did see "/CFIDE/administrator/templates/secure_profile_error.cfm" in Server Settings->Settings->Site-wide Error Handler on the server the logging was not working. I compared with the other server where the logging works, and "Site-wide Error Handler" is empty, so I emptied that field too, and ran the testing page. Wow, I see the error messsage logged in now. Problem resolved! this is a huge help for us. We are doing MS SQL migration for our Coldfusion projects, and we have a lot of issues to fix. The debugging& logging is really important for us to fix issue more effeciently. I am glad I join this Community. Thank you everyone!
Copy link to clipboard
Copied
Great to hear, glad to have helped, and thanks for marking the answer for future readers.
BTW, to readers seeing this with the default threaded interface (especially on a phone, where it's lacking indentation), note that several messages that follow are from EARLIER, before their response and this one.
Copy link to clipboard
Copied
Bkbk, the OP had said in their initial post that it was only SOME errors not being logged, and they had also confirmed that the logging settings were identical on the two servers--and that the cf instances were implemented in identical folders.
All these are why I took the discussion in the direction I did with my previous reply.
Let's now hear what they say in reply to either of our suggestions. That should surely guide us to an ultimate resolution. (And FWIW I do have cf11 running if there's need for us to demonstrate/check anything there.)
Copy link to clipboard
Copied
Charlie, my last answer crossed yours on the wire. I hope it clarifies things.
Copy link to clipboard
Copied
Yes. And indeed, I was writing my reply to you when in fact @Enchanted_vibrancy5464 was writing.
So thanks to them for that confirmation. Now let's hear if they may address what I'd offered. I really think it may still hold the answer to what's amiss, even given what they'd shared.
BTW, reading their reply on a phone was difficult because somehow the last part of their reply was in a code formatted paragraph...so it ran off to the right and couldn't be easily read (again, on a phone. Probably no big deal for those on a computer.)
Anyway, @Enchanted_vibrancy5464, I edited your post to correct that. It's something I only very rarely do, and only to correct such clearly unintended mistakes