示例#1
0
func (s *LoggerTestSuite) TestSendNilFormatter() {
	// reset logger built by SetupTest
	s.logger = golsys.New("udp", ":10001", syslog.LOG_INFO, "test", nil)
	assert.Error(s.T(), s.logger.Send(gol.NewEmergency("message", "unknown")))
}
示例#2
0
func (s *LoggerTestSuite) SetupTest() {
	s.logger = golsys.New("udp", ":10001", syslog.LOG_INFO, "test", &formatters.Text{})
}
示例#3
0
文件: example.go 项目: steenzout/gol
func init() {
	log = mfsyslog.New("udp", "127.0.0.1:32376", syslog.LOG_EMERG, "example.go", &formatters.Text{})
}