|
|
@ -90,7 +90,7 @@ func (s *slsProducer) Close() error { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// SendLog 发送普通日志
|
|
|
|
// SendLog 发送普通日志
|
|
|
|
func (s *slsProducer) SendLog(log *sls.Log) error { |
|
|
|
func (s *slsProducer) SendLog(topic, source string, log *sls.Log) error { |
|
|
|
err := s.pr.SendLog(s.opts.project, s.opts.logstore, "", "", log) |
|
|
|
err := s.pr.SendLog(s.opts.project, s.opts.logstore, "", "", log) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
@ -102,7 +102,7 @@ func (s *slsProducer) SendLog(log *sls.Log) error { |
|
|
|
func (s *slsProducer) SendRequestLog(env enum.Env, req *Request) error { |
|
|
|
func (s *slsProducer) SendRequestLog(env enum.Env, req *Request) error { |
|
|
|
log := GenerateLog(req) |
|
|
|
log := GenerateLog(req) |
|
|
|
|
|
|
|
|
|
|
|
err := s.pr.SendLog("bcpm-log", getLogStore(env), "", "", log) |
|
|
|
err := s.pr.SendLog("bcpm-log", getLogStore(env), "request-go", req.RemoteAddr, log) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|