There is example code here
https://sdkdocs.roku.com/display/sdkdoc/roSystemLogwhich copied simply causes a crash;
Current Function:
119: ' Handle the roSystemLogEvents:'
120: i = msg.GetInfo()
121: If i.LogType = "http.error" or i.LogType = "http.connect"
122: If i.LogType = "http.error"
123: metrics.errorCount = metrics.errorCount + 1
124: print "http error: "; i.HttpCode; "URL: ";i.Url
125: End If
126: url = i.OrigUrl
127:* If (not httpIpAddrs.DoesExist(url)) Then
128: httpIpAddrs[url] = CeateObject("roAssociativeArray")
129: End If
130: httpIpAddrs[url].AddReplace(i.TargetIp,"")
131: Else If i.LogType = "bandwidth.minute"
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/source/Main.brs(127)
127: If (not httpIpAddrs.DoesExist(url)) Then
Backtrace:
#1 Function appeventloop(app As Dynamic) As Dynamic
file/line: pkg:/source/Main.brs(127)
#0 Function main(args As Dynamic) As Dynamic
file/line: pkg:/source/Main.brs(51)
Local Variables:
Obviously the 'httpIpAddrs' object needs to be initialized, but what is the point of this object, is it explained elsewhere?
aspiring