Skip to content

Commit b451e1a

Browse files
committed
Wrap lines in log messages with line feeds
Signed-off-by: Chris Jackson <[email protected]>
1 parent 095584a commit b451e1a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue

+7-8
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,8 @@
125125
:class="{ 'disabled-link': !stateConnected || !stateProcessing, 'no-margin-left': $device.ios }"
126126
@click="loggingPause" />
127127
<f7-link icon-ios="f7:stop_fill" icon-aurora="f7:stop_fill" icon-md="material:stop_fill"
128-
:icon-color="!stateConnected ? 'gray' : ''"
129-
:tooltip="!$device.ios ? 'Stop receiving logs' : ''"
130-
:class="{ 'disabled-link': !stateConnected, 'no-margin-left': $device.ios }"
131-
@click="loggingStop" />
128+
:icon-color="!stateConnected ? 'gray' : ''" :tooltip="!$device.ios ? 'Stop receiving logs' : ''"
129+
:class="{ 'disabled-link': !stateConnected, 'no-margin-left': $device.ios }" @click="loggingStop" />
132130
</f7-nav-right>
133131

134132
<f7-subnavbar :inner="false" style="padding-right: var(--f7-safe-area-right)">
@@ -158,8 +156,8 @@
158156
:class="{ 'disabled-link': filterCount == 0 }" @click="downloadCSV" />
159157
<f7-link icon-f7="rectangle_on_rectangle" tooltip="Copy filtered log to clipboard"
160158
:class="{ 'disabled-link': filterCount == 0 }" @click="copyTableToClipboard" />
161-
<f7-link icon-f7="trash" tooltip="Clear the log buffer"
162-
:class="{ 'disabled-link': tableData.length == 0 }" @click="clearLog" />
159+
<f7-link icon-f7="trash" tooltip="Clear the log buffer" :class="{ 'disabled-link': tableData.length == 0 }"
160+
@click="clearLog" />
163161
<f7-link @click="toggleErrorDisplay" tooltip="Always show error level logs">
164162
<f7-icon v-if="showErrors" f7="exclamationmark_triangle_fill" />
165163
<f7-icon v-else f7="exclamationmark_triangle" />
@@ -220,7 +218,7 @@
220218
table-layout auto
221219
222220
td.nowrap
223-
padding 5px
221+
padding 0px
224222
text-align left
225223
white-space nowrap
226224
@@ -233,6 +231,7 @@
233231
234232
tr.table-rows
235233
height 31px
234+
vertical-align top
236235
237236
tr.error
238237
background-color rgb(255, 96, 96)
@@ -486,7 +485,7 @@ export default {
486485
milliseconds: ms,
487486
level: logEntry.level.toUpperCase(),
488487
loggerName: logEntry.loggerName,
489-
message: logEntry.message
488+
message: logEntry.message.replace(/\n/g, '<br>')
490489
}
491490
492491
this.batchLogs.push(entry)

0 commit comments

Comments
 (0)