@@ -36,7 +36,7 @@ import (
3636var Wg sync.WaitGroup
3737
3838func ProcessPids (pids []int , pid2Name map [int ]string , hd bool , tags string , timestamps []string ) (rUrls []string , err error ) {
39- if len (pids ) < = 0 {
39+ if len (pids ) = = 0 {
4040 logger .Log ("Empty pids, no action needed." )
4141 return
4242 }
@@ -103,7 +103,7 @@ func FullCapture(pid int, appName string, hd bool, tags string, tsParam string)
103103 if tsParam == "" {
104104 tsParam = timestamp
105105 }
106- //parameters = fmt.Sprintf("de=%s&ts=%s", getOutboundIP().String(), tsParam)
106+ // parameters = fmt.Sprintf("de=%s&ts=%s", getOutboundIP().String(), tsParam)
107107 timezoneBase64 := base64 .StdEncoding .EncodeToString ([]byte (timezone ))
108108 parameters = fmt .Sprintf ("de=%s&ts=%s&timezoneId=%s" , getOutboundIP ().String (), tsParam , timezoneBase64 )
109109 endpoint = fmt .Sprintf ("%s/ycrash-receiver?%s" , config .GlobalConfig .Server , parameters )
@@ -179,7 +179,6 @@ func FullCapture(pid int, appName string, hd bool, tags string, tsParam string)
179179 // A.3 Agent log file
180180 var agentLogFile * os.File
181181 if ! config .GlobalConfig .M3 {
182-
183182 // Renaming the log file name to yc360Logs from agentlog
184183 agentLogFile , err = logger .StartWritingToFile ("yc360Logs.out" )
185184 if err != nil {
@@ -376,7 +375,6 @@ Ignored errors: %v
376375 // ------------------------------------------------------------------------------
377376 var appLogs chan capture.Result
378377 if len (config .GlobalConfig .AppLogs ) > 0 && config .GlobalConfig .AppLogLineCount != 0 {
379-
380378 appLogsContainDollarSign := false
381379 for _ , configAppLog := range config .GlobalConfig .AppLogs {
382380 if strings .Contains (string (configAppLog ), "$" ) {
@@ -417,7 +415,6 @@ Falling back to capture all configured appLogs without appName filtering.`)
417415 if found {
418416 appLogsMatchingAppName = append (appLogsMatchingAppName , config .AppLog (beforeSearchToken ))
419417 }
420-
421418 }
422419
423420 if len (appLogsMatchingAppName ) > 0 {
@@ -454,7 +451,7 @@ Falling back to capture all configured appLogs without appName filtering.`)
454451
455452 paths := config.AppLogs {}
456453 for _ , f := range discoveredLogFiles {
457- logger .Debug ().Msgf ("OnDemand FullCapture: discovered log file: %s" , string ( f ) )
454+ logger .Debug ().Msgf ("OnDemand FullCapture: discovered log file: %s" , f )
458455 isGCLog := false
459456 for _ , fileName := range globFiles {
460457 // To exclude discovered gc log such f as /tmp/buggyapp-%p-%t.log
@@ -778,7 +775,6 @@ Resp: %s
778775 resp , err := RequestFin (finEp )
779776 if err != nil {
780777 logger .Log ("post yc-fin err %s" , err .Error ())
781- err = nil
782778 }
783779
784780 endTime := time .Now ()
0 commit comments