mirror of
https://github.com/knadh/listmonk.git
synced 2025-10-02 03:14:42 +08:00
Display filename and milliseconds in timestamp on the logs admin UI (#2280)
This commit is contained in:
parent
ad162c259a
commit
2f5ab4c619
2 changed files with 6 additions and 4 deletions
|
@ -973,11 +973,12 @@ section.analytics {
|
|||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.timestamp {
|
||||
.timestamp, .file {
|
||||
color: $primary;
|
||||
display: inline-block;
|
||||
min-width: 175px;
|
||||
margin-right: 5px;
|
||||
user-select: auto;
|
||||
}
|
||||
|
||||
.line:hover {
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<div class="lines" ref="lines">
|
||||
<template v-for="(l, i) in lines">
|
||||
<span :set="line = splitLine(l)" :key="i" class="line">
|
||||
<span class="timestamp" :title="line.file">{{ line.timestamp }}</span>
|
||||
<span class="timestamp">{{ line.timestamp }} </span>
|
||||
<span class="file">{{ line.file }}: </span>
|
||||
<span class="log-message">{{ line.message }}</span>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -15,8 +16,8 @@
|
|||
<script>
|
||||
// Regexp for splitting log lines in the following format to
|
||||
// [timestamp] [file] [message].
|
||||
// 2021/05/01 00:00:00 init.go:99: reading config: config.toml
|
||||
const reFormatLine = /^([0-9\s:/]+) (.+?\.go:[0-9]+):\s/g;
|
||||
// 2021/05/01 00:00:00:00 init.go:99: reading config: config.toml
|
||||
const reFormatLine = /^([0-9\s:/]+\.[0-9]{6}) (.+?\.go:[0-9]+):\s(.+)$/;
|
||||
|
||||
export default {
|
||||
name: 'LogView',
|
||||
|
|
Loading…
Add table
Reference in a new issue