• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How do I log (looking at Application.log) the URL being process when there's an error?

Participant ,
Mar 15, 2020 Mar 15, 2020

Copy link to clipboard

Copied

I am looking/investigating some error we've been having with a CF app. And looking at Application.log, it is not listing the full URL being process when the error occurs.

 

I would like to change this behavior but I do not know how to do this? Can you please help?

 

Example of an entry in Application.log

------

"Error","ajp-nio-8016-exec-2","03/13/20","15:02:40","","File not found: /testapp/index.cfm The specific sequence of files included or processed is: /opt/www/apps/testapp/index.cfm'' "

----

Thanks

Views

325

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2020 Mar 16, 2020

Copy link to clipboard

Copied

LATEST

Sadly, no, there is no way to get that log to list the "full url".

 

But you can indeed step in and handle the error yourself, and then you can do whatever you want (including logging more, or writing info to a database, or sending yourself  an email, or all three).

 

This is about using "error handling" in CF, which can be done either in the admin (a "site wide error handler" that would handle all errors not handled elsewhere), or in an application (either in the onerror method of application.cfc, or using the cferror tag in an application.cfm), or in a page (using cftry/cfcatch, or their cfscript equivalents). In such an error handler, you can see/dump the CGI scope (or any scope or variable), and that has what you need to see the "full url".

 

I suspect you may not be familiar with CF error handling, or perhaps you would have already tried it to get this info. Just google: coldfusion error handling. You will find several resources to walk you through those options.

 

But if you already know of those and just wondered how to get the log to show the full url in the logs, the answer (as far as I know) is that you cannot.

 

One last thing: if you get a tool like FusionReactor (fusion-reactor.com), it tracks CF pages that have errors, and certainly shows you the "full url", but also can show more details about the error, and LOTS more about the request (the ip address, the user agent, the headers and form vars passed in, and more). It has a free 14-day trial.

 

And that trial is of what's called the "ultimate" edition, which adds another feature called "event snapshots", which give even MORE info to help with such error handling: any error that happens more once will track now also the state of variables at the time of the error, and more. For more info (including a 2-minute video), see https://www.fusion-reactor.com/event-snapshot-automated-root-cause-analysis/.

 

Let us know if any of this gets you going, or not.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation