Hello everyone,
I found out a way to truncate a message in logback after 500 characters using 
encoding patterns like shown below.
<encoder>
    <pattern>%d [%thread] %-5p %logger{56}:%line - %.-500m%n</pattern>
</encoder>

But I would also want to append some extra characters at the end, say '...', if 
the message was truncated. Is that possible in logback? 3 dots don't need to be 
added in every log message, but only in the truncated messages.

Please advise.

Regards,
Sagar Shah

Sagar Shah
Sr. Software Engineer

[MEDHOST logo]
6550 Carothers Parkway Suite 160 Franklin, TN 37067
p. c. f.
[email protected]<mailto:[email protected]>


MEDHOST welcomes your feedback on our service. If there are any areas we can 
improve, please email our Quality Service Department at 
[email protected]<mailto:[email protected]>. If you receive 
STAR service, please email 
[email protected]<mailto:[email protected]> and tell us about your 
experience. We appreciate your business.


CONFIDENTIALITY STATEMENT: The documents accompanying this transmission may 
contain confidential and/or legally privileged health or other information. 
This information is intended only for the use of the individual or entity named 
above. The authorized recipient of this information is prohibited from 
disclosing this information to any other party unless required to do so by law 
or regulation and is required to destroy the information after its stated need 
has been fulfilled. If you are not the intended recipient, you are hereby 
notified that any disclosure, copying, distribution, or action taken in 
reliance on the contents of these documents is strictly prohibited. If you have 
received this information in error, please notify the sender immediately and 
arrange for the return or destruction of these documents.

_______________________________________________
logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to