mirror of
https://gitee.com/johng/gf
synced 2026-07-04 13:02:36 +08:00
add default writer for glog to be integrated with other package; comments update for glog
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gogf/gf/g"
|
||||
"github.com/gogf/gf/g/os/gcron"
|
||||
"time"
|
||||
)
|
||||
@ -12,7 +12,9 @@ func test() {
|
||||
|
||||
func main() {
|
||||
_, err := gcron.Add("*/10 * * * * ?", test)
|
||||
fmt.Println(err)
|
||||
fmt.Println(gcron.Entries())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
g.Dump(gcron.Entries())
|
||||
time.Sleep(10 * time.Second)
|
||||
}
|
||||
|
||||
10
geg/os/glog/glog_writer.go
Normal file
10
geg/os/glog/glog_writer.go
Normal file
@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/g/os/glog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
w := glog.GetWriter()
|
||||
w.Write([]byte("hello"))
|
||||
}
|
||||
Reference in New Issue
Block a user