The logging level for the DataPower Operator can be adjusted to aid in troubleshooting issues.
You can adjust the log level of the DataPower Operator Pod. The supported log levels are as follows:
- integer > 0
- Setting the log level to 1 is the equivalent of using
- Setting the log level to an integer > 1 will increase the log level past
debugfor increased verbosity of operator code, as well as library code.
- Setting the log level to an integer >= 4 will set the log level for Kubernetes API logging.
The mechanism by which you change the logging level may depend on how you installed the operator.
Our Helm chart offers the
operator.logLevel property as a method to change the log level.
The DataPower Operator’s
Deployment can also be modified in the cluster directly. In the container spec you will see something like this:
args:- "--zap-encoder=json"- "--zap-level=info"- "--zap-time-encoding=iso8601"
These values can be modified following the default
zap logger documentation.
Logs can be retrieved from the DataPower Operator pod using
oc logs, or the OpenShift console if deployed on OpenShift.
Some examples, where
datapower-operator-777fccc85-68gs6 is the Pod name:
# dump all logs to fileoc logs datapower-operator-777fccc85-68gs6 > datapower-operator-logs.txt# stream logsoc logs -f datapower-operator-777fccc85-68gs6# dump logs from previous container (i.e. after a restart)oc logs --previous datapower-operator-777fccc85-68gs6