See this post, which includes a snippet that extracts stack traces using a temporary logfile. You can adapt this to capture all the log events - but except for stack traces I think you're better off using a private mechanism to log info.
https://groups.google.com/forum/#!searchin/codenameone-discussions/logfile%7Csort:relevance/codenameone-discussions/kCbXGCqmt2o/N6vvLXtECQAJ -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/211aa836-f6be-427a-bab6-5f5b6011bc54%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
