for문 제거

main
JungJun 3 years ago
parent 0e94ecaf5a
commit a58eda893f

@ -171,84 +171,84 @@ func StatsCommandVG(t *icsnet.IcsTCPNet, bufend string) {
l.Printf(icslog.LOG_LEVEL_INFO, -1, "Connected from - %s", t.RemoteAddr())
for {
statReads, rlen, rerr := t.ReadS(10137, bufend) // 여기서 전체 몇 byte씩 읽어서 로그를 찍을건지 알아야함
if rerr != nil {
if rerr.GetError() != io.EOF {
l.Printf(icslog.LOG_LEVEL_ERROR, -1, "[Stat Command] ReadS Error! - %s[%d:%d]",
rerr.GetError(), rlen, len(statReads))
break
}
} else {
fmt.Printf("Recved Stat Command(%s) %d \n", statReads, rlen)
statInfos.ChangeByteToString(statReads)
svc := statInfos.SvcType[0:1]
seqId := s.Seq + svc + randNum
insLog := ""
insLog += fmt.Sprintf("seqId:%s\n", seqId)
insLog += fmt.Sprintf("LogTime:%s, ", statInfos.LogTime)
insLog += fmt.Sprintf("LogType:%s, ", statInfos.LogType)
insLog += fmt.Sprintf("Sid:%s, ", statInfos.Sid)
insLog += fmt.Sprintf("ResultCode:%s, ", statInfos.ResultCode)
insLog += fmt.Sprintf("ReqTime:%s, ", statInfos.ReqTime)
insLog += fmt.Sprintf("RspTime:%s, ", statInfos.RspTime)
insLog += fmt.Sprintf("ClientIp:%s, ", statInfos.ClientIp)
insLog += fmt.Sprintf("DevInfo:%s, ", statInfos.DevInfo)
insLog += fmt.Sprintf("OsInfo:%s, ", statInfos.OsInfo)
insLog += fmt.Sprintf("NwInfo:%s, ", statInfos.NwInfo)
insLog += fmt.Sprintf("SvcName:%s, ", statInfos.SvcName)
insLog += fmt.Sprintf("DevModel:%s, ", statInfos.DevModel)
insLog += fmt.Sprintf("CarrierType:%s, ", statInfos.CarrierType)
insLog += fmt.Sprintf("HostName:%s, ", statInfos.HostName)
insLog += fmt.Sprintf("ScnName:%s, ", statInfos.ScnName)
insLog += fmt.Sprintf("CallId:%s, ", statInfos.CallId)
insLog += fmt.Sprintf("TrId:%s, ", statInfos.TrId)
insLog += fmt.Sprintf("ConcCall:%s, ", statInfos.ConcCall)
insLog += fmt.Sprintf("SvcType:%s, ", statInfos.SvcType)
insLog += fmt.Sprintf("SvcReqTime:%s, ", statInfos.SvcReqTime)
insLog += fmt.Sprintf("SvcRspTime:%s, ", statInfos.SvcRspTime)
insLog += fmt.Sprintf("TransferNo:%s, ", statInfos.TransferNo)
insLog += fmt.Sprintf("CallTime:%s, ", statInfos.CallTime)
insLog += fmt.Sprintf("CallType:%s, ", statInfos.CallType)
insLog += fmt.Sprintf("FunName:%s, ", statInfos.FunName)
insLog += fmt.Sprintf("ResultMsg:%s, ", statInfos.ResultMsg)
insLog += fmt.Sprintf("SttText:%s, ", statInfos.SttText)
insLog += fmt.Sprintf("TtsText:%s", statInfos.TtsText)
l.Printf(icslog.LOG_LEVEL_INFO, -1, "%s", insLog)
fmt.Printf("stats- %s \n", statInfos.SeqId)
fmt.Printf("stats- %s \n", statInfos.LogTime)
fmt.Printf("stats- %s \n", statInfos.LogType)
fmt.Printf("stats- %s \n", statInfos.Sid)
fmt.Printf("stats- %s \n", statInfos.ResultCode)
fmt.Printf("stats- %s \n", statInfos.ReqTime)
fmt.Printf("stats- %s \n", statInfos.RspTime)
fmt.Printf("stats- %s \n", statInfos.ClientIp)
fmt.Printf("stats- %s \n", statInfos.DevInfo)
fmt.Printf("stats- %s \n", statInfos.OsInfo)
fmt.Printf("stats- %s \n", statInfos.NwInfo)
fmt.Printf("stats- %s \n", statInfos.SvcName)
fmt.Printf("stats- %s \n", statInfos.DevModel)
fmt.Printf("stats- %s \n", statInfos.CarrierType)
fmt.Printf("stats- %s \n", statInfos.HostName)
fmt.Printf("stats- %s \n", statInfos.ScnName)
fmt.Printf("stats- %s \n", statInfos.CallId)
fmt.Printf("stats- %s \n", statInfos.TrId)
fmt.Printf("stats- %s \n", statInfos.ConcCall)
fmt.Printf("stats- %s \n", statInfos.SvcType)
fmt.Printf("stats- %s \n", statInfos.SvcReqTime)
fmt.Printf("stats- %s \n", statInfos.SvcRspTime)
fmt.Printf("stats- %s \n", statInfos.TransferNo)
fmt.Printf("stats- %s \n", statInfos.CallTime)
fmt.Printf("stats- %s \n", statInfos.CallType)
fmt.Printf("stats- %s \n", statInfos.FunName)
fmt.Printf("stats- %s \n", statInfos.ResultMsg)
fmt.Printf("stats- %s \n", statInfos.SttText)
fmt.Printf("stats- %s \n", statInfos.TtsText)
// for {
statReads, rlen, rerr := t.ReadS(10137, bufend) // 여기서 전체 몇 byte씩 읽어서 로그를 찍을건지 알아야함
if rerr != nil {
if rerr.GetError() != io.EOF {
l.Printf(icslog.LOG_LEVEL_ERROR, -1, "[Stat Command] ReadS Error! - %s[%d:%d]",
rerr.GetError(), rlen, len(statReads))
return
}
} else {
fmt.Printf("Recved Stat Command(%s) %d \n", statReads, rlen)
statInfos.ChangeByteToString(statReads)
svc := statInfos.SvcType[0:1]
seqId := s.Seq + svc + randNum
insLog := ""
insLog += fmt.Sprintf("seqId:%s\n", seqId)
insLog += fmt.Sprintf("LogTime:%s, ", statInfos.LogTime)
insLog += fmt.Sprintf("LogType:%s, ", statInfos.LogType)
insLog += fmt.Sprintf("Sid:%s, ", statInfos.Sid)
insLog += fmt.Sprintf("ResultCode:%s, ", statInfos.ResultCode)
insLog += fmt.Sprintf("ReqTime:%s, ", statInfos.ReqTime)
insLog += fmt.Sprintf("RspTime:%s, ", statInfos.RspTime)
insLog += fmt.Sprintf("ClientIp:%s, ", statInfos.ClientIp)
insLog += fmt.Sprintf("DevInfo:%s, ", statInfos.DevInfo)
insLog += fmt.Sprintf("OsInfo:%s, ", statInfos.OsInfo)
insLog += fmt.Sprintf("NwInfo:%s, ", statInfos.NwInfo)
insLog += fmt.Sprintf("SvcName:%s, ", statInfos.SvcName)
insLog += fmt.Sprintf("DevModel:%s, ", statInfos.DevModel)
insLog += fmt.Sprintf("CarrierType:%s, ", statInfos.CarrierType)
insLog += fmt.Sprintf("HostName:%s, ", statInfos.HostName)
insLog += fmt.Sprintf("ScnName:%s, ", statInfos.ScnName)
insLog += fmt.Sprintf("CallId:%s, ", statInfos.CallId)
insLog += fmt.Sprintf("TrId:%s, ", statInfos.TrId)
insLog += fmt.Sprintf("ConcCall:%s, ", statInfos.ConcCall)
insLog += fmt.Sprintf("SvcType:%s, ", statInfos.SvcType)
insLog += fmt.Sprintf("SvcReqTime:%s, ", statInfos.SvcReqTime)
insLog += fmt.Sprintf("SvcRspTime:%s, ", statInfos.SvcRspTime)
insLog += fmt.Sprintf("TransferNo:%s, ", statInfos.TransferNo)
insLog += fmt.Sprintf("CallTime:%s, ", statInfos.CallTime)
insLog += fmt.Sprintf("CallType:%s, ", statInfos.CallType)
insLog += fmt.Sprintf("FunName:%s, ", statInfos.FunName)
insLog += fmt.Sprintf("ResultMsg:%s, ", statInfos.ResultMsg)
insLog += fmt.Sprintf("SttText:%s, ", statInfos.SttText)
insLog += fmt.Sprintf("TtsText:%s", statInfos.TtsText)
l.Printf(icslog.LOG_LEVEL_INFO, -1, "%s", insLog)
fmt.Printf("stats- %s \n", statInfos.SeqId)
fmt.Printf("stats- %s \n", statInfos.LogTime)
fmt.Printf("stats- %s \n", statInfos.LogType)
fmt.Printf("stats- %s \n", statInfos.Sid)
fmt.Printf("stats- %s \n", statInfos.ResultCode)
fmt.Printf("stats- %s \n", statInfos.ReqTime)
fmt.Printf("stats- %s \n", statInfos.RspTime)
fmt.Printf("stats- %s \n", statInfos.ClientIp)
fmt.Printf("stats- %s \n", statInfos.DevInfo)
fmt.Printf("stats- %s \n", statInfos.OsInfo)
fmt.Printf("stats- %s \n", statInfos.NwInfo)
fmt.Printf("stats- %s \n", statInfos.SvcName)
fmt.Printf("stats- %s \n", statInfos.DevModel)
fmt.Printf("stats- %s \n", statInfos.CarrierType)
fmt.Printf("stats- %s \n", statInfos.HostName)
fmt.Printf("stats- %s \n", statInfos.ScnName)
fmt.Printf("stats- %s \n", statInfos.CallId)
fmt.Printf("stats- %s \n", statInfos.TrId)
fmt.Printf("stats- %s \n", statInfos.ConcCall)
fmt.Printf("stats- %s \n", statInfos.SvcType)
fmt.Printf("stats- %s \n", statInfos.SvcReqTime)
fmt.Printf("stats- %s \n", statInfos.SvcRspTime)
fmt.Printf("stats- %s \n", statInfos.TransferNo)
fmt.Printf("stats- %s \n", statInfos.CallTime)
fmt.Printf("stats- %s \n", statInfos.CallType)
fmt.Printf("stats- %s \n", statInfos.FunName)
fmt.Printf("stats- %s \n", statInfos.ResultMsg)
fmt.Printf("stats- %s \n", statInfos.SttText)
fmt.Printf("stats- %s \n", statInfos.TtsText)
}
// }
}
func StatsCommandVA(t *icsnet.IcsTCPNet, bufend string) {

Loading…
Cancel
Save