Something went wrong. Try again.
Your trusty automation assistant in TLE Community misadventures!
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354<template> <br v-if="content === '---'" style="line-height: 1" /> <p v-else class="log-message"> <span class="log-level" :style="{ color: colorLogLevelMap[level] }">{{ level }}:</span> <span class="log-content">{{ content }}</span> </p></template>
<script>const colorLogLevelMap = { error: 'rgb(232, 61, 48)', warn: 'rgb(236, 236, 81)', info: 'rgb(17, 222, 17)', debug: 'rgb(55, 146, 233)', verbose: 'rgb(85, 255, 255)', silly: 'rgb(255, 115, 253)',}
export default { props: { level: { type: String, default: 'info', }, content: { type: String, required: true, }, },
data() { return { colorLogLevelMap } },}</script>
<style scoped>.log-message { display: flex; align-items: flex-start; margin: 0;}
.log-level { flex: 0 0 8ch; text-align: right; margin-right: 0.5em;}
.log-content { white-space: pre-wrap;}</style>