modify mask&flag
Security / scan (1.19.13) (push) Successful in 56s
Details
Security / scan (>=1.20) (push) Successful in 46s
Details
Test / uint (1.19.13, ubuntu-latest) (push) Successful in 49s
Details
Test / uint (>=1.20, ubuntu-latest) (push) Successful in 54s
Details
Verify / lint (1.19.13) (push) Successful in 1m4s
Details
Verify / lint (>=1.20) (push) Successful in 52s
Details
Security / scan (1.19.13) (push) Successful in 56s
Details
Security / scan (>=1.20) (push) Successful in 46s
Details
Test / uint (1.19.13, ubuntu-latest) (push) Successful in 49s
Details
Test / uint (>=1.20, ubuntu-latest) (push) Successful in 54s
Details
Verify / lint (1.19.13) (push) Successful in 1m4s
Details
Verify / lint (>=1.20) (push) Successful in 52s
Details
This commit is contained in:
parent
9c80be5b7c
commit
210dcda822
8
glog.go
8
glog.go
|
@ -110,7 +110,7 @@ func write(w *Paper, prefix string, format string, values ...any) {
|
|||
log := strings.Builder{}
|
||||
now := ""
|
||||
flg := GetFlag()
|
||||
|
||||
|
||||
if (flg&FlagDate) != 0 && (flg&FlagTime) != 0 {
|
||||
now = time.Now().Format("2006-01-02 15:04:05 ")
|
||||
} else if (flg & FlagDate) != 0 {
|
||||
|
@ -125,7 +125,7 @@ func write(w *Paper, prefix string, format string, values ...any) {
|
|||
log.WriteString(prefix)
|
||||
log.WriteString(now)
|
||||
}
|
||||
|
||||
|
||||
if (flg & FlagFunc) != 0 {
|
||||
c, _, _, ok := runtime.Caller(2)
|
||||
if ok {
|
||||
|
@ -135,7 +135,7 @@ func write(w *Paper, prefix string, format string, values ...any) {
|
|||
log.WriteString("? ")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (flg & FlagLongFile) != 0 {
|
||||
_, p, l, ok := runtime.Caller(2)
|
||||
if ok {
|
||||
|
@ -151,7 +151,7 @@ func write(w *Paper, prefix string, format string, values ...any) {
|
|||
log.WriteString("?:? ")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
log.WriteString("| ")
|
||||
log.WriteString(fmt.Sprintf(format, values...))
|
||||
log.WriteString("\n")
|
||||
|
|
Loading…
Reference in New Issue