Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
Also note the benefit of dkonigs' approach, where you leave things in the slog2 buffers unless a user actually takes action to retrieve them (at which point the app does the slog2 dump to file thing).
The slog2 output is kept entirely in RAM. It doesn't add any wear-and-tear to the flash storage, whereas if your app is constantly logging little bits to a file in the filesystem, that will waste more power and add more wear on the flash drive.
The flip side of this is that the slog2 stuff uses a circular buffer, so at some point older info will have been lost. If your purpose is to "catch" a problem shortly after it has occurred, then the slog2 method is probably best. If it's to grab a log from a long-running process with lots of output, then you probably need the filesystem based approach, despite the disadvantages. (Note that in that case you should consider having an in-app flag to let the user control this, so you aren't wasting power and flash unnecessarily across your entire user base.)