diff --git a/platform/platform-impl/src/com/intellij/notification/EventLog.java b/platform/platform-impl/src/com/intellij/notification/EventLog.java index ff727c0cc95a..6ee8f4710428 100644 --- a/platform/platform-impl/src/com/intellij/notification/EventLog.java +++ b/platform/platform-impl/src/com/intellij/notification/EventLog.java @@ -142,14 +142,14 @@ public class EventLog { String content = truncateLongString(showMore, notification.getContent()); RangeMarker afterTitle = null; - boolean hasHtml = parseHtmlContent(title, notification, logDoc, showMore, links, lineSeparators); + boolean hasHtml = parseHtmlContent(addIndents(title, indent), notification, logDoc, showMore, links, lineSeparators); if (StringUtil.isNotEmpty(title)) { if (StringUtil.isNotEmpty(content)) { appendText(logDoc, ": "); afterTitle = logDoc.createRangeMarker(logDoc.getTextLength() - 2, logDoc.getTextLength()); } } - hasHtml |= parseHtmlContent(content, notification, logDoc, showMore, links, lineSeparators); + hasHtml |= parseHtmlContent(addIndents(content, indent), notification, logDoc, showMore, links, lineSeparators); List actions = notification.getActions(); if (NotificationsManagerImpl.newEnabled() && !actions.isEmpty()) { @@ -199,6 +199,11 @@ public class EventLog { return new LogEntry(logDoc.getText(), status, list); } + @NotNull + private static String addIndents(@NotNull String text, @NotNull String indent) { + return StringUtil.replace(text, "\n", "\n" + indent); + } + private static boolean isLongLine(@NotNull List actions) { int size = actions.size(); if (size > 3) { diff --git a/platform/platform-impl/src/com/intellij/notification/EventLogConsole.java b/platform/platform-impl/src/com/intellij/notification/EventLogConsole.java index 092acbd58b59..fcc23ba209fc 100644 --- a/platform/platform-impl/src/com/intellij/notification/EventLogConsole.java +++ b/platform/platform-impl/src/com/intellij/notification/EventLogConsole.java @@ -248,7 +248,7 @@ class EventLogConsole { new TextAttributes(null, null, null, null, Font.BOLD)); } - String date = DateFormatUtil.formatTimeWithSeconds(notification.getTimestamp()) + " "; + String date = DateFormatUtil.formatTime(notification.getTimestamp()) + " "; append(document, date); int startLine = document.getLineCount() - 1; @@ -263,8 +263,7 @@ class EventLogConsole { : ConsoleViewContentType.LOG_WARNING_OUTPUT_KEY; int msgStart = document.getTextLength(); - String message = pair.message; - append(document, message); + append(document, pair.message); TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(key); int layer = HighlighterLayer.CARET_ROW + 1;