How to Enable and Access App Gateway Logs
App Gateway provides log files to help you monitor App Gateway's behavior. Learn how to configure and access thes log files.
Configure App Gateway Logs
Enable App Gateway log files and configure logging levels.
To disable logs or change the log levels of the App Gateway server, login to the server, edit the /usr/local/nginx/conf/cloudgate.config
file, and then under the general
section, change the value of the logLevel
attribute, and then save the file.
"general":{
"disableAuthorize":false,
"logLevel":"warn",
"logFolder":"",
"policyMode":"gateway",
"policyRefreshTime":300,
"policyStaleTime":3600,
"policyExpiryTime":604800
}
Note:
Values for thelogLevel
attribute are: off | crit | security | config | fail | warn | info | trace1 | trace2 | trace3
.
By Default, the log files are located in the /usr/local/nginx/logs
folder. If you want to change the default log folder, then update the value of the logFolder
attribute under the general
section of the /usr/local/nginx/conf/cloudgate.config
file.
To change the log level for the agent service of the App Gateway, modify the
/usr/local/nginx/conf/cloudgate.config
file, and set the
logLevel
and logFolder
attributes under the
agentConfig
section as follows:
trace3
and the log
folder to /tmp
, update the
/usr/local/nginx/conf/cloudgate.config
file with the following values, and
then save the
file."agentConfig":{
"pollIntervalSecs":60,
"daemon":true,
"logFolder":"/tmp",
"logLevel":"trace3"
}
The log level and log folder changes takes effect next time you start App Gateway. See Start and Stop App Gateway.
View App Gateway Logs
Learn about the different log files App Gateway uses.
App Gateway is based on a NGINX
Server. The following
NGIX
native log files are located in the
/usr/local/nginx/logs/
directory:
Table 29-1 NGINX Native Log Files
Log File | Description |
---|---|
access.log |
NGINX Native access log contains
information about all HTTP requests received by
NGINX , and by App Gateway.
|
error.log |
NGINX Native debug log.
|
nginx.pid |
Contains the NGINX Server process ID
number.
|
The following App Gateway specific log files are located in the
/usr/local/nginx/logs/
directory:
Table 29-2 App Gateway Log Files
Log File | Description |
---|---|
cg-trace-main.log |
App Gateway main log file. |
cg-trace-policy.log |
Logs information about a policy refresh, when App Gateway contacts Oracle Identity Cloud Service. |
cg-trace-session.log |
Logs information about the sessions created and handled by App Gateway. |
cg-trace-token.log |
Logs information about the access tokens received by App Gateway. |
cg-trace-agent.log |
Agent logging file. |
cg-trace-init.log |
Contains information about the initialization process. |