2 Star 0 Fork 0

mirrors_alecthomas / log4go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
SocketLogWriter_Manual.go 443 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
import (
"time"
)
import l4g "code.google.com/p/log4go"
func main() {
log := l4g.NewLogger()
log.AddFilter("network", l4g.FINEST, l4g.NewSocketLogWriter("udp", "192.168.1.255:12124"))
// Run `nc -u -l -p 12124` or similar before you run this to see the following message
log.Info("The time is now: %s", time.Now().Format("15:04:05 MST 2006/01/02"))
// This makes sure the output stream buffer is written
log.Close()
}
1
https://gitee.com/mirrors_alecthomas/log4go.git
git@gitee.com:mirrors_alecthomas/log4go.git
mirrors_alecthomas
log4go
log4go
d146e6b86faa

搜索帮助