log
parameter
Use log
to enable logging data for monitoring, debugging, diagnostics,
troubleshooting, security, auditing performance optimization, visibility, and historical analysis.
The IBM® Sterling Intelligent
Promising by default writes application level logs to console. However, you can
choose to redirect these logs to Kafka by using Log4j2 Kafka appender.
Default console logging
Console logging is enabled by default. To access the logs, use kubectl or oc commands. When a container is restarted, deleted, or re-created, the old logs are cleared.
Log4j2 Kafka appender logging
Use the Log4j2 Kafka appender to send log messages to a Kafka topic. To use the Log4j2 Kafka appender, you must have a Kafka cluster that is set up and running. All the IBM Sterling Intelligent Promising services have inbuilt support for the Lo4j2 Kafka appender.
log
.
Property | Default value | Value type | Required | Description |
---|---|---|---|---|
logChannels
|
CONSOLE |
string | No | By default, console logging is enabled. If you wish to use the Log4j2 Kafka appender for
logging, set the logChannel value to KAFKA . |
logLevel |
INFO |
string | No | Specify this property to override the log level at the individual server level. Available
options are OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL . For more information,
see #ConfigCRDProperties__types. |
logTopic |
|
string | No | If you select Kafka for logging, specify the topic to which you want to log the data.
logTopic is not applicable for the default console logging. |
If you are using two Kafka clusters, one for the application and another for logging, specify
loggingContactPoints
in the externalServices
custom resource for
Kafka. Also, in the secret, add the Kafka properties that are prefixed with log_
.
For more information, see Creating a
secret.
If you want to use the same contactPoints
that you defined for the application,
then do not define loggingContactPoints
. By default contactPoints
is used to push logs to a Kafka topic. For more information about Kafka, see
loggingContactPoints
in kafka parameter.
Custom attributes in log metadata
- DATACENTER
- Name of the compute cluster where you host and manage Sterling Intelligent Promising deployment. For example, Dublin_data_center.
- APP_NAME
- Name of the application service that you are using. Allowed values can be
rules
,cas
,search
, and other services.
- COMPONENT_NAME
- Indicates whether the component is an API server or a backend server.
- NODE_NAME
- Hostname of the worker node in the cluster.
- POD_NAME
- Name of the pod.
- POD_IP
- Private IP of the pod.