Search code examples
c++ctizentizen-native-app

Logging into a specific file in Tizen?



Before asking this question I searched a lot about Logging (the terminal Debug Log) into a file for Tizen Application. I figured out some other ways to implement using several alternatives a bit complex pathway for this problem. But I want something straightforward, simple and builtin for Tizen Applications.

So here is what I want -

  1. I will run a Tizen application written in C/C++. It will generate response logs on the terminal based on the several queries I ask to the app.
  2. I want to save those logs into a specific file like file_name.log .
  3. That file_name.log will be saved somewhere within my PC. Developer can change the location as my own.

Is there any command or an existing system for Tizen apps ?
Thank you in advance.


Solution

  • Read https://developer.tizen.org/development/guides/native-application/error-handling/system-logs about Tizen's built-in logging system.

    As stated in the page, the logs can be also retrieved from the command line using sdb shell dlogutil [options...] [TAG], or simply sdb dlog [options...] [TAG]. So if you want to save the output as a file, simply do sdb dlog [-d] MY_APP > file_name.log. If this is not what you are searching for, please be more specific in your question.