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
committerManikandan C <mchockalingam@de.adit-jv.com>2018-12-11 09:31:57 +0100
commit061005d2b6ec8859aa7c9838d1dd1d573f4037ff (patch)
tree8b3c5469a97301380c712ae61166f25ad63f8841 /src/examples/dlt-example-user.c
parentf5863cfb0b452ee1fb1077009cffda64db2cfacf (diff)
downloadDLT-daemon-061005d2b6ec8859aa7c9838d1dd1d573f4037ff.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;