[TIMOB-9306] Blackberry: add a universal logging mechanism for tibb
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-29T10:42:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2012-08 BB, BB Preview 3 |
Components | BlackBerry |
Labels | n/a |
Reporter | Jean-Philippe Lemieux |
Assignee | Jean-Philippe Lemieux |
Created | 2012-05-30T07:31:17.000+0000 |
Updated | 2017-03-08T18:13:33.000+0000 |
Description
Need to add a universal logger to the framework. May use exceptions and stop the app in debug mode and only log in release mode.
Also go over all existing qDebug and printf to update them to use the new logger.
The logger will also need to do some locking to ensure that logging from concurrent threads doesn't result in logs cut and merged in the middle.
Notes from JP: - thread safety - use of a tag (ERROR, DEBUG, etc) - function name + line number - actual logger should be in the native implementation - logger should be in the native side and retrievable via the factoryObject, then the Ti will write to it, so the interface needs to be generic to allow for other native implementations - Alex already created a macro that uses qDebug underneath Also, some guy on the internet says qDebug isn't thread safe, but need to check more. There's also possibly an ndk logging mechanism since there is already some sort of log.
I saw a suggestion to put the logging in its own thread.
https://github.com/Macadamian/titanium_mobile/pull/85
Closing ticket as resolved.