Logging CFHTTP Calls
Logging CFHTTP Calls
As of Lucee 6.1.0.135, all cfhttp calls are logged by default to a dedicated http log file at the log level info. This logging behavior provides more visibility into HTTP requests made through Lucee applications, helping to track external requests easily.
Default Logging Behavior
In the default setup, Lucee logs HTTP requests with the following settings:
- Log File:
http.log(If thehttp.loglog does not exist, entries are directed toapplication.log). - Log Level:
info.
Example Log Entry
An example entry for a cfhttp call might look like this:
"TRACE","pool-3-thread-2","10/29/2024","18:31:04","cftrace","httpRequest [GET] to [https://lucee.org], returned [200 OK] in 294ms, at /index.cfm:10; /index.cfm.callLucee():20"
This log entry includes:
- Request Details: Method (
GET), URL (https://lucee.org) - Response Status:
[200 OK] - Response Time:
294ms - Source Location: Code locations responsible for the request.
Changes in Logging Behavior (Pre-Lucee 6.1.0.135)
In earlier versions of Lucee, before version 6.1.0.135:
- Log File: Only
application.logwas used for logging HTTP requests. - Log Level:
traceinstead ofinfo.
The change to a dedicated http log and info level helps separate HTTP logs from other system logs, improving clarity.