Skip to content

Commit

Permalink
(fix) timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Aug 8, 2024
1 parent ee13afa commit 2fc3ff9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package pkg

import (
"embed"
"fmt"
"net/http"
"os"
"path/filepath"
"strconv"
"time"

"github.com/fvbock/endless"
"github.com/go-echarts/statsview"
Expand Down Expand Up @@ -84,10 +86,9 @@ func HTTPErrorHandler(err error, c echo.Context) {
}

func ltsv() string {
time_custom := "2006-01-02 15:04:05"
_ = time_custom
timeCustom := time.Now().Format("2006-01-02 15:04:05")
var format string
format += "time:${time_custom}\t"
format += fmt.Sprintf("time:%s\t", timeCustom)
format += "host:${remote_ip}\t"
format += "forwardedfor:${header:x-forwarded-for}\t"
format += "req:-\t"
Expand Down

0 comments on commit 2fc3ff9

Please sign in to comment.