Checking and setting log levels
Use the log action in the cfctl utility to check or set the logging level for a running application in your IBM® Cyber Fraud deployment.
Before you begin
Ensure that you have the cfctl utility installed. For more information, see Installing the cfctl utility.
Command syntax
cfctl -- log get
cfctl -- log get <service>
cfctl -- log set <service> <level>
cfctl -- log --log <logger-name> set <service> <level>
- -l, --log <logger-name>
- Specifies a logger name to target when you set a log level.
- <service>
- Specifies the service name. The default log level for all services is
INFO. Available services:arithmetic-function-mcp-serverconfigdata-analysis-mcp-serverdate-time-conversion-mcp-serverencrypt-decrypt-mcp-servergeo-spatial-mcp-serveridentitymgmtinvestigationmcpmgmtservice
- <level>
-
Specifies the log level. Valid values include:
TRACEDEBUGINFOWARNINGERRORCRITICAL
Examples
List log levels for all applications:
cfctl -- log get
Get the log level for a specific application:
cfctl -- log get <app>
Set the log level for a specific application:
cfctl -- log set <app> <level>
Set the investigation application log level to DEBUG:
cfctl -- log set investigation DEBUG
Set the log level for a specific logger within an application:
cfctl -- log --log app.db set investigation TRACE
Reset a service to the default level:
cfctl -- log set <service> INFO
Restarting the pods
After changing the log level for a service, you must manually restart the pods for the log level change to take effect.
To restart the pods, delete the pod and it will be automatically recreated.
oc delete pod -lname=<servicename>
For example, to restart the investigation service pod:
oc delete pod -lname=investigation
More information
To display extra command information, run the following command:
cfctl show log