Skip to content

Commit

Permalink
NMS-17070 change documents for change log size
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Junid committed Mar 3, 2025
1 parent b10c25d commit fb2839a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
17 changes: 17 additions & 0 deletions docs/modules/reference/pages/telemetryd/protocols/jti.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
----

0 comments on commit fb2839a

Please sign in to comment.