summaryrefslogtreecommitdiff
path: root/src/examples/dlt-example-user.c
diff options
context:
space:
mode:
authorManikandan C <mchockalingam@de.adit-jv.com>2018-11-29 11:15:54 +0100
committerChristoph Lipka <clipka@users.noreply.github.com>2018-12-21 10:16:46 +0100
commitaff2511aa2a34fe91c02753f2d6f7b0044c82d80 (patch)
tree06bfaa6c6cfd4e3fdd99bd4cdb9be4043d1afa72 /src/examples/dlt-example-user.c
parent83516bb6bd95d1a865c44bc7f33f70426e1143dc (diff)
downloadDLT-daemon-aff2511aa2a34fe91c02753f2d6f7b0044c82d80.tar.gz
Logging: avoided missing of log level change callback Added new context registration Macro and API which has option to register log level change callback along with it. This will avoid missing of initial log level change callback when daemon sends the log level change control msg during context registration
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Diffstat (limited to 'src/examples/dlt-example-user.c')
-rw-r--r--src/examples/dlt-example-user.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/dlt-example-user.c b/src/examples/dlt-example-user.c
index 4083d4d..325f865 100644
--- a/src/examples/dlt-example-user.c
+++ b/src/examples/dlt-example-user.c
@@ -285,16 +285,16 @@ int main(int argc, char* argv[])
dlt_verbose_mode();
DLT_REGISTER_APP("LOG","Test Application for Logging");
- DLT_REGISTER_CONTEXT(mycontext1,"TEST","Test Context for Logging");
- DLT_REGISTER_CONTEXT(mycontext2, "TS1", "Test Context1 for injection");
- DLT_REGISTER_CONTEXT(mycontext3, "TS2", "Test Context2 for injection");
+ DLT_REGISTER_CONTEXT(mycontext1, "TEST", "Test Context for Logging");
+ DLT_REGISTER_CONTEXT_LLCCB(mycontext2, "TS1", "Test Context1 for injection", dlt_user_log_level_changed_callback);
+ DLT_REGISTER_CONTEXT_LLCCB(mycontext3, "TS2", "Test Context2 for injection", dlt_user_log_level_changed_callback);
+
DLT_REGISTER_INJECTION_CALLBACK(mycontext1, 0x1000, dlt_user_injection_callback);
DLT_REGISTER_INJECTION_CALLBACK_WITH_ID(mycontext2, 0x1000, dlt_user_injection_callback_with_specific_data, (void*)"TS1 context");
DLT_REGISTER_INJECTION_CALLBACK(mycontext2, 0x1001, dlt_user_injection_callback);
DLT_REGISTER_INJECTION_CALLBACK_WITH_ID(mycontext3, 0x1000, dlt_user_injection_callback_with_specific_data, (void*)"TS2 context");
DLT_REGISTER_INJECTION_CALLBACK(mycontext3, 0x1001, dlt_user_injection_callback);
-
DLT_REGISTER_LOG_LEVEL_CHANGED_CALLBACK(mycontext1, dlt_user_log_level_changed_callback);
text = message;