Configuring Logging Levels with JVM Properties
In cloud native environments, change logging levels for MATRIXX applications and components with JVM properties.
subchartname.logging.level=level
- sub-chart_name — The name of the sub-chart, such as
rsgateway
. - level — The logging level, such as
debug
.
rsgateway:
logging:
level: debug
If you want to limit log output, you can configure logging at the package level. The following sections describe how to configure logging at the package level for Spring Boot applications and non-Spring Boot applications.
Spring Boot Applications
- RS Gateway
- MATRIXX Backoffice Customer Tool
- My MATRIXX
- Event Streaming Framework
"-Dlogging.level.packageName=level"
- packageName is a Java package name. For example:
- RS Gateway —
com.matrixx.rsgateway.SendMessage
- MATRIXX Backoffice Customer Tool —
com.matrixx.cm
- My MATRIXX —
com.matrixx.data.AdminDataLoader
- Event Streaming Framework —
com.matrixx.eventStreamer
- RS Gateway —
- level is a valid log4j2 log level, for example,
debug
.
rsgateway:
configuration:
container:
args:
- "-Dlogging.level.com.matrixx.rsgateway.SendMessage=debug"
Non-Spring Boot Applications
For the non-Spring Boot applications Gateway Proxy and Notification Framework, you must create a ConfigMap in /opt/mtx/conf to pass a
custom file (log4j2-custom.xml
) with the logging levels.
- Gateway Proxy — /opt/mtx/conf/log4j2-mtx_gateway_proxy.xml
- Notification Framework — /opt/mtx/conf/log4j2-mtx_notifier_camel.xml
sub-chart_name:
configuration:
container:
configmap:
customLog4j2FileName: |-
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="status" monitorInterval='interval'>
<Loggers>
<Logger name="logger_name" level="level" />
<Logger name="logger_name" level="level" />
</Loggers>
</Configuration>
args:
- "-Dlog4j2.configurationFile=/opt/mtx/conf/customLog4j2FileName,/opt/mtx/conf/log4j2_file"
- sub-chart_name — The name of the sub-chart, such as
rsgateway
. - customLog4j2FileName — The name of your custom log4j2 file.
- status — The level of internal log4j2 events that should
be logged to the console. Valid values for this attribute are
off
,trace
,debug
,info
,warn
,error
,fatal
, andall
. Log4j logs details about initialization, rollover and other internal actions to the status logger. - logger_name — The MATRIXX application logger name.
- level — The logging level, such as
debug
. - log4j2_file — The out-of-the-box log4j2 configuration file.
gateway-proxy:
configuration:
container:
configmap:
log4j2-custom.xml: |-
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" monitorInterval='60'>
<Loggers>
<Logger name="com.matrixx.gateway.minaIoHandlers.AuthClientHandler" level="debug" />
<Logger name="com.matrixx.gateway.engineInterface.EngineClient" level="trace" />
</Loggers>
</Configuration>
args:
- "-Dlog4j2.configurationFile=/opt/mtx/conf/log4j2-custom.xml,/opt/mtx/conf/log4j2-mtx_gateway_proxy.xml"
Upgrade the Application
helm upgrade [RELEASE] [CHART] [flags]
matrixx-webapps-gateways
Kubernetes
namespace:helm upgrade ag1 matrixx/matrixx --namespace matrixx-webapps-gateways -f matrixx-webapps-gateways_values.yaml --version 5251
For more information about the MATRIXX environment variables, see the discussion about container directories and environment variables in MATRIXX Installation and Upgrade.