diff --git a/container/karaf/src/main/filtered-resources/etc/org.ops4j.pax.logging.cfg b/container/karaf/src/main/filtered-resources/etc/org.ops4j.pax.logging.cfg index f69920f90ca5..15b8f6e3b3a3 100644 --- a/container/karaf/src/main/filtered-resources/etc/org.ops4j.pax.logging.cfg +++ b/container/karaf/src/main/filtered-resources/etc/org.ops4j.pax.logging.cfg @@ -26,7 +26,7 @@ color.debug = cyan color.trace = cyan # Common pattern layout for appenders -log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %encode{%.-2000m}{CRLF}%n +log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %encode{%.-500m}{CRLF}%n log4j2.out.pattern = \u001b[90m%d{HH:mm:ss\.SSS}\u001b[0m %highlight{%-5level}{FATAL=${color.fatal}, ERROR=${color.error}, WARN=${color.warn}, INFO=${color.info}, DEBUG=${color.debug}, TRACE=${color.trace}} \u001b[90m[%t]\u001b[0m %msg%n%throwable diff --git a/docs/modules/reference/pages/telemetryd/protocols/jti.adoc b/docs/modules/reference/pages/telemetryd/protocols/jti.adoc index c9048790b552..20de6cb026cc 100644 --- a/docs/modules/reference/pages/telemetryd/protocols/jti.adoc +++ b/docs/modules/reference/pages/telemetryd/protocols/jti.adoc @@ -116,3 +116,20 @@ The following globals will be passed to the script: | Decoded JTI message from which the metrics should be extracted. | org.opennms.netmgt.telemetry.adapters.jti.proto.TelemetryTop |=== + +NOTE: In OpenNMS, logs are essential for monitoring and troubleshooting. By default, the log message size is limited to 500 characters. However, in some cases, such as when viewing detailed proto object logs, you may need to increase the character size to capture the full log details. + +=== Steps to Increase Log Character Size +Locate file `org.ops4j.pax.logging.cfg` in the `${OPENNMS_HOME}/etc/` directory. + +Locate the `log4j2.pattern` property in the file. By default, it is set to limit log messages to 500 characters see `%encode{%.-500m}` + +[source, console] +---- +log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %encode{%.-500m}{CRLF}%n +---- +To increase the character size, modify the `%.-500m` part of the pattern. For example, to increase the limit to 1000 characters, change it to `%.-1000m`: +[source, console] +---- +log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %encode{%.-1000m}{CRLF}%n +---- \ No newline at end of file