Skip to content

Commit

Permalink
update log fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sianao committed Nov 26, 2024
1 parent 10902b9 commit 7abbc88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io"
"net/http"
"time"
)

type consoleColorModeValue int
Expand Down Expand Up @@ -127,8 +128,8 @@ func DefaultLogFormatter(param LogFormatterParams) {
resetColor = param.ResetColor()
}

fmt.Printf("[GitProxy] |%s %3d %s| %13v | %15s |%s %-7s %s %#v\n%s",
statusColor, param.StatusCode, resetColor,
fmt.Printf("[Proxy] %s |%s %d %s| %13v | %15s |%s %-7s %s %#v %s\n",
statusColor, time.Now().Format("01-02 15:04:05"), param.StatusCode, resetColor,
param.ContentLength,
param.ClientIP,
methodColor, param.Method, resetColor,
Expand Down

0 comments on commit 7abbc88

Please sign in to comment.