mirror of
https://gitee.com/johng/gf
synced 2026-07-03 03:39:35 +08:00
24 lines
370 B
Go
24 lines
370 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
mylog := g.Log()
|
|
for {
|
|
mylog.Debug(ctx, "debug")
|
|
time.Sleep(time.Second)
|
|
mylog.Info(ctx, "info")
|
|
time.Sleep(time.Second)
|
|
mylog.Warning(ctx, "warning")
|
|
time.Sleep(time.Second)
|
|
mylog.Error(ctx, "error")
|
|
time.Sleep(time.Second)
|
|
}
|
|
}
|