Hello rapidM2M Community,
The #applog container provides a standardized mechanism to log major applicative events as a time series and represent them at the rapidM2M portal without any further coding.
It’s part of the ~dde core library, which must be imported into your project to use this feature.
To use the App Log, proceed as follows:
- Add these lines to the main.dde file in your rapidM2M Studio project to enable the #applog container:
#applog // enable the applog container // Optional #define APPLOG_TO_CONSOLE 1 // activate automatic console output
- Trigger an App log entry from any file of the Device Logic like that:
applog ( "my.msg", "a=%d;b=%d", a, b); // regular log level applog_debug ( "my.dbg", "a=%d;b=%d", a, b); // debug applog_ok ( "my.okmsg", "a=%d;b=%d", a, b); // ok applog_warning( "my.warn", "a=%d;b=%d", a, b); // warning applog_alarm ( "my.alarm", "a=%d;b=%d", a, b); // alarm
Log in to the rapidM2M Portal and open the “Site/Applications” area.
Access the App Log browser via the “Additional Site Options” of your site: