-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6efb5f3
commit 1a22b27
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- | ||
{ | ||
"title": "Logging CFHTTP Calls", | ||
"id": "logging-cfhttp-calls", | ||
"since": "6.1.0.135", | ||
"description": "Learn how Lucee logs all CFHTTP calls and how to manage these logs. This guide explains the default behavior, log file locations, and changes in logging from earlier Lucee versions.", | ||
"keywords": [ | ||
"cfhttp", | ||
"logging", | ||
"Lucee", | ||
"log level", | ||
"http log" | ||
] | ||
} | ||
--> | ||
|
||
# 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 the `http.log` log does not exist, entries are directed to `application.log`). | ||
- **Log Level**: `info`. | ||
|
||
### Example Log Entry | ||
|
||
An example entry for a `cfhttp` call might look like this: | ||
|
||
```plaintext | ||
"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.log` was used for logging HTTP requests. | ||
- **Log Level**: `trace` instead of `info`. | ||
|
||
The change to a dedicated `http` log and `info` level helps separate HTTP logs from other system logs, improving clarity. |