Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
logtransfer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢宇轩
logtransfer
Commits
dfceb499
Commit
dfceb499
authored
Jan 13, 2022
by
谢宇轩
😅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重新规划时区的配置,去掉无用输出
parent
9a310ea9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
3 deletions
+0
-3
format.go
entity/format.go
+0
-2
alarm.go
plugin/alarm.go
+0
-1
No files found.
entity/format.go
View file @
dfceb499
...
@@ -26,7 +26,6 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) {
...
@@ -26,7 +26,6 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) {
// 给时间调回UTC+8
// 给时间调回UTC+8
logTime
,
_
:=
time
.
ParseInLocation
(
": 06-01-02 15:04:05 "
,
message
[
:
strings
.
Index
(
message
,
"["
)],
time
.
FixedZone
(
"UTC"
,
8
*
3600
))
logTime
,
_
:=
time
.
ParseInLocation
(
": 06-01-02 15:04:05 "
,
message
[
:
strings
.
Index
(
message
,
"["
)],
time
.
FixedZone
(
"UTC"
,
8
*
3600
))
mateItem
.
create
=
logTime
mateItem
.
create
=
logTime
keyword
:=
serviceWfLogKeyWord
keyword
:=
serviceWfLogKeyWord
for
_
,
word
:=
range
keyword
{
for
_
,
word
:=
range
keyword
{
...
@@ -47,7 +46,6 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) {
...
@@ -47,7 +46,6 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) {
}
}
// 那这里获取UTC时间为8小时前
// 那这里获取UTC时间为8小时前
mateItem
.
Data
[
"timestamp"
]
=
mateItem
.
create
.
UTC
()
.
Format
(
"2006-01-02 15:04:05"
)
mateItem
.
Data
[
"timestamp"
]
=
mateItem
.
create
.
UTC
()
.
Format
(
"2006-01-02 15:04:05"
)
result
:=
*
mateItem
result
:=
*
mateItem
mateItem
.
reset
()
mateItem
.
reset
()
MatePool
.
Put
(
mateItem
)
MatePool
.
Put
(
mateItem
)
...
...
plugin/alarm.go
View file @
dfceb499
...
@@ -21,7 +21,6 @@ func (dump *Dump) HandleFunc(m *entity.Matedata) error {
...
@@ -21,7 +21,6 @@ func (dump *Dump) HandleFunc(m *entity.Matedata) error {
if
err
!=
nil
{
if
err
!=
nil
{
continue
continue
}
}
log
.
Println
(
"DP"
,
createdAt
)
// UTC时间就是+8小时
// UTC时间就是+8小时
v
=
createdAt
.
UTC
()
.
Format
(
"2006-01-02 15:04:05"
)
v
=
createdAt
.
UTC
()
.
Format
(
"2006-01-02 15:04:05"
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment