The debug class is automatically created and can be globally accessed by using the reference * debug.
It has to be freed after the iomux Run function in the main class.
In your app code, you shouldn't use the debug class in release builds directly,
but instead the log functions of your AppInstance class.
If you use VisualGDB or Valgrind to run your App, the logs are written to STDOUT.
Otherwise they are written to a logfile under /var/log/apps/appname-timestamp.txt.
There are up to 5 log files for each App and each log file can have a maximum size of 5 MB.
The AppInstance object itself provides log functions, where the appName and appDomain are always printed
to make out different AppInstance objects.
In addition, these log functions do only write logs to the log file, if the corresponding log flag
for the application is set within the taskmanager or your code.
See appservice.htm for more information.
See appservice.htm for more information.
debug->printf("MyClass::TestFunction %s %x", "Hallo", 1234);
// 2016-11-07 13:29:05.663103 MyClass::TestFunction Hallo 0x42d
byte buf[4];
debug->HexDump(buf, sizeof(buf));
// 2016-11-07 13:29:05.663103 Hexdump of address 0x7EFFFC60, 4 bytes:
// 2016-11-07 13:29:05.663301 0x00000000 00 00 00 00