Record every web request GlobalForms receives, such as page loads, form submissions and API calls, in a log file. Request logs help you investigate errors, unexpected traffic and integration problems.
This feature requires GlobalForms version 10.7.1 or greater. Request logging is off by default.
Turn on request logging
-
Add the following to
config\local.json:JSON{ "settings": { "logging": { "request": { "enabled": true } } } } -
Restart the GlobalForms service.
Requests are written to logs\request.log in the install folder. A new file is started each day.
Settings
|
Setting |
Default |
Description |
|---|---|---|
|
|
|
Turns request logging on or off. |
|
|
|
What each line contains. See Log formats. |
|
|
|
Write to |
|
|
|
How often to start a new log file, for example |
|
|
|
When |
Log formats
|
Format |
What each line includes |
|---|---|
|
|
Client address, date, request, status, response size, referring page and browser. Best for most investigations. |
|
|
Like |
|
|
Client address, request, status, size and response time |
|
|
Request, status, size and response time only |
You can also define your own format, for example:
{
"settings": {
"logging": {
"request": {
"enabled": true,
"format": ":date[iso] :method :url :status :response-time ms"
}
}
}
}
Things to consider
-
Disk space: busy servers can produce large logs. Check the
logsfolder regularly and remove old log files you no longer need. -
Privacy: request logs contain client IP addresses and the addresses of pages and API calls. Protect the
logsfolder and keep logs only as long as you need them. -
Performance: logging adds a small amount of work to each request. Turn it off when you no longer need it.
Troubleshooting
|
Symptom |
Cause and fix |
|---|---|
|
No |
Check that |
|
The log has no status codes |
|