Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
亚龙 田
easygo
Commits
feaf229e
Commit
feaf229e
authored
3 years ago
by
tyl-ubuntu
Browse files
Options
Download
Email Patches
Plain Diff
fix Psm bug
parent
345cf5ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
metric/metric.go
metric/metric.go
+4
-4
No files found.
metric/metric.go
View file @
feaf229e
...
...
@@ -23,7 +23,7 @@ todo:
*/
type
mylog
struct
{
p
sm
string
P
sm
string
}
var
(
...
...
@@ -37,7 +37,7 @@ func createMylog() {
func
Init
(
psm
string
)
{
once
.
Do
(
createMylog
)
(
*
mylogClient
)
.
p
sm
=
psm
(
*
mylogClient
)
.
P
sm
=
psm
}
func
LogContent
(
c
*
gin
.
Context
,
psm
,
others
string
)
string
{
...
...
@@ -113,7 +113,7 @@ func ErrorMetric(logid, msg string) {
if
ok
{
msg
=
file
+
":"
+
strconv
.
Itoa
(
line
)
+
": "
+
msg
}
InsertDoc
(
index
,
logid
,
mylogClient
.
p
sm
,
"[Error] "
+
msg
)
InsertDoc
(
index
,
logid
,
mylogClient
.
P
sm
,
"[Error] "
+
msg
)
}
func
Metric
(
logid
,
psm
,
others
string
,
c
*
gin
.
Context
)
{
...
...
@@ -144,7 +144,7 @@ func RpcMetric(logid string, variables ...string) {
for
_
,
v
:=
range
variables
{
content
=
content
+
v
+
"; "
}
InsertDoc
(
index
,
logid
,
mylogClient
.
p
sm
,
content
)
InsertDoc
(
index
,
logid
,
mylogClient
.
P
sm
,
content
)
}
func
LocationMetric
(
province
string
)
{
...
...
This diff is collapsed.
Click to expand it.
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