diff --git a/src/device-plugins/logs/index.js b/src/device-plugins/logs/index.js index 1aeda58f3..c52ec0bf4 100644 --- a/src/device-plugins/logs/index.js +++ b/src/device-plugins/logs/index.js @@ -290,8 +290,7 @@ export default class LogTable extends SonarDevicePlugin { ); this.device.addLogListener((entry: DeviceLogEntry) => { - const {icon, style} = - LOG_TYPES[(entry.type: string)] || LOG_TYPES.verbose; + const {icon, style} = LOG_TYPES[(entry.type: string)] || LOG_TYPES.debug; // clean message const message = entry.message.trim(); @@ -450,9 +449,16 @@ export default class LogTable extends SonarDevicePlugin { entry.tag === previousEntry.tag && previousRow.type != null ) { - const count = (previousRow.columns.time.value.props.count || 1) + 1; + // duplicate log, increase counter + const count = + previousRow.columns.type.value && + previousRow.columns.type.value.props && + typeof previousRow.columns.type.value.props.children === 'number' + ? previousRow.columns.type.value.props.children + 1 + : 2; + const type = LOG_TYPES[previousRow.type] || LOG_TYPES.debug; previousRow.columns.type.value = ( - {count} + {count} ); } else { rows.push(row);