github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/actor/v3action/logcache.go (about) 1 package v3action 2 3 import ( 4 "strings" 5 ) 6 7 // LogCacheURL gets the log-cache URL, either directly from ccClientV3.Info, or by 8 // getting the target and s/api/logcache/ 9 // This works around the bug logged in story https://www.pivotaltracker.com/story/show/170138644 10 11 func (actor Actor) LogCacheURL() string { 12 info, _, _, err := actor.CloudControllerClient.GetInfo() 13 if err == nil { 14 logCacheURL := info.LogCache() 15 if logCacheURL != "" { 16 return logCacheURL 17 } 18 } 19 return strings.Replace(actor.Config.Target(), "api", "log-cache", 1) 20 }