SOLR-3706: getRenderedMessage() rather than + ""

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1521741 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2013-09-11 06:06:48 +00:00
parent a338f097c6
commit 3cf82592c1
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ public class Log4jWatcher extends LogWatcher<LoggingEvent> {
doc.setField("time", new Date(event.getTimeStamp()));
doc.setField("level", event.getLevel().toString());
doc.setField("logger", event.getLogger().getName());
doc.setField("message", event.getMessage() + ""); // avoid NPE when we have an event with null message
doc.setField("message", event.getRenderedMessage());
ThrowableInformation t = event.getThrowableInformation();
if(t!=null) {
doc.setField("trace", Throwables.getStackTraceAsString(t.getThrowable()));