pmd333
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2015
08:55 PM
Brightscript logging and error handling
hi,
I am new to channel development and would like to make a simple arithmetic app. I would like to put in logging and error handling into my bs in the beginning, but I'm not experienced in doing that because I have usually relied on a debugger for that instead. It would be nice to also eventually turn the logging into something that could be used for tracing user problems and logging some statistics on user behavior to a server. So I'm tempted to do something strange like rely on the eval/run commands, but I'm trying to resist. I'm hoping someone more experienced can provide some tips.
Thank you,
pmd
I am new to channel development and would like to make a simple arithmetic app. I would like to put in logging and error handling into my bs in the beginning, but I'm not experienced in doing that because I have usually relied on a debugger for that instead. It would be nice to also eventually turn the logging into something that could be used for tracing user problems and logging some statistics on user behavior to a server. So I'm tempted to do something strange like rely on the eval/run commands, but I'm trying to resist. I'm hoping someone more experienced can provide some tips.
Thank you,
pmd
8 REPLIES 8
dev42
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2015
04:26 PM
Re: Brightscript logging and error handling
"pmd333" wrote:
So I'm tempted to do something strange like rely on the eval/run commands
I'll parrot what the guru's around these parts have said, "don't use eval/run". That said, if you're looking to make a data driven app that pulls "lessons" / "levels" from the 'net, I'm sure it can be done!
I'm also sure you can do logging and save it to the 'net.... but unfortunately, I don't know how ( yet ) and I'm not well versed in the privacy concerns. You can fetch an ID/model # from the unit, but what if your demographic included families with more than one student? or twins?!
pmd333
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2015
06:28 PM
Re: Brightscript logging and error handling
It looks like someone posted a library to help get started called librokudev on github. I will start there.
pmd333
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2015
06:34 PM
Re: Brightscript logging and error handling
Also someone posted brstest on github. Maybe I can use that to help with testing and cut down on the need for logging and error handling.
sna
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2015
06:04 AM
Re: Brightscript logging and error handling
Hi,
I'm new to ROKU, I'm just exploring how to use brstest. If anybody can let me know how can I use brstest with example programs will be very helpful and appreciated.
I'm new to ROKU, I'm just exploring how to use brstest. If anybody can let me know how can I use brstest with example programs will be very helpful and appreciated.
sjb64
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2015
07:36 AM
Re: Brightscript logging and error handling
Might be a dumb question but...
If you wrote an app that downloaded an external file to a string or tmp:/ (containing code) that was then processed using Eval/Run, could that app even pass QA for a public channel? There would be no way to test the future downloaded code to ensure it met standards and rules (not a menu system, etc.), as the code could be changed at will after publication.
If you wrote an app that downloaded an external file to a string or tmp:/ (containing code) that was then processed using Eval/Run, could that app even pass QA for a public channel? There would be no way to test the future downloaded code to ensure it met standards and rules (not a menu system, etc.), as the code could be changed at will after publication.
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2015
04:37 PM
Re: Brightscript logging and error handling
Part of the Developer Agreement states: "The Channel Applications will not download or install executable code." Seems to me that downloading BRS and executing it with Run/Eval would violate this. I'm not sure how long that clause has been around since I know of at least one very old public channel that did just that.
-JT
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2015
06:33 PM
Re: Brightscript logging and error handling
I don't think that counts, you would be downloading brightscript code, which I would interpret is just passive code, not downloading and running some sort of exe file, which I think that rule specifically is talking about. But of course I may be wrong.
sjb64
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2015
05:40 AM
Re: Brightscript logging and error handling
On a Roku with the eval/run ability, Brightscript is executable code, so I think it would definitely be the target of that clause. I don't know if anyone at Roku actually unzips the package and looks at source code, either manually or by an automated system looking for triggers so see if clauses like there are violated. But regardless, my concern, which it turns out TheEndless has addressed previously in the forums, is addressed.
On a side note, I didn't mean to hijack pmd333's thread, if anyone wants to continue this discussion let's start a new thread.
On a side note, I didn't mean to hijack pmd333's thread, if anyone wants to continue this discussion let's start a new thread.