refactor: tianji report use log rather than fmt

This commit is contained in:
moonrailgun 2023-11-01 00:44:01 +08:00
parent 896170836c
commit 39b4ff9ec5
2 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,6 @@ package main
import (
"bytes"
"flag"
"fmt"
jsoniter "github.com/json-iterator/go"
"log"
"net"
@ -152,7 +151,7 @@ func sendHTTPRequest(_url url.URL, payload ReportData) {
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Send request error:", err)
log.Println("Send request error:", err)
return
}
@ -162,7 +161,7 @@ func sendHTTPRequest(_url url.URL, payload ReportData) {
body := new(bytes.Buffer)
_, err = body.ReadFrom(resp.Body)
if err != nil {
fmt.Println("Read response error:", err)
log.Println("Read response error:", err)
return
}

View File

@ -211,7 +211,7 @@ export const ServerList: React.FC<{
dataSource={dataSource}
pagination={false}
locale={{ emptyText: <Empty description="No server online" /> }}
rowClassName={(record) => clsx(!isServerOnline(record) && 'opacity-80')}
rowClassName={(record) => clsx(!isServerOnline(record) && 'opacity-60')}
/>
</div>
);