summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLassi Marttala <Lassi.LM.Marttala@partner.bmw.de>2013-02-18 09:48:52 +0100
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2013-07-19 16:54:28 +0200
commit668fceeda0f50deb96f0a286c920594d3222f33d (patch)
treeccaef3637f921d09c30b50e96ceb88c98527613c /doc
parente4ef602f86c7725fbe52f9cd129851ef24be61e0 (diff)
downloadDLT-daemon-668fceeda0f50deb96f0a286c920594d3222f33d.tar.gz
Document asynchronous delay in DLT_REGISTER_APP
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'doc')
-rw-r--r--doc/dlt_cheatsheet.txt8
-rw-r--r--doc/dlt_user_manual.txt6
2 files changed, 9 insertions, 5 deletions
diff --git a/doc/dlt_cheatsheet.txt b/doc/dlt_cheatsheet.txt
index 49ed4bd..906378b 100644
--- a/doc/dlt_cheatsheet.txt
+++ b/doc/dlt_cheatsheet.txt
@@ -59,12 +59,14 @@ int main(int argc, const char\* argv\[\])
}
----
-If your application uses fork(), you may not call DLT_REGISTER_APP() before fork(). And fork() should never be called after DLT_REGISTER_APP. This is because the DLT library must be initialised for each process, which is done by DLT_REGISTER_APP().
-If you are not sure where you are calling DLT_REGISTER_APP() the first time, you can initialise the DLT user library by calling the initialisation routine directly.
-
+.Important notes:
+* If your application uses fork(), you may not call DLT_REGISTER_APP before fork(). And fork() should never be called after DLT_REGISTER_APP. This is because of state information and inter process communication channel to daemon would be copied to new process, but threads would be not. If you are not sure where you are calling DLT_REGISTER_APP() the first time, you can initialise the DLT user library by calling the initialisation routine directly.
----
dlt_user_init();
----
+* DLT_REGISTER_APP is asynchronous. It may take some milliseconds to establish the IPC channel. Because of this, you might lose messages if you log immediately after registering. Typically this is not a problem, but may arise especially with simple examples.
+
+
Define all contexts
--------------------
diff --git a/doc/dlt_user_manual.txt b/doc/dlt_user_manual.txt
index d6f02a4..54773e9 100644
--- a/doc/dlt_user_manual.txt
+++ b/doc/dlt_user_manual.txt
@@ -204,10 +204,12 @@ DLT_REGISTER_CONTEXT(mycontext,"TEST","Test Context for Logging");
}
----
-Important note: If your application uses fork(), you may not call DLT_REGISTER_APP before fork(). And fork() should never be called after DLT_REGISTER_APP. This is because of state information and inter process communication channel to daemon would be copied to new process, but threads would be not.
+.Important notes:
+* If your application uses fork(), you may not call DLT_REGISTER_APP before fork(). And fork() should never be called after DLT_REGISTER_APP. This is because of state information and inter process communication channel to daemon would be copied to new process, but threads would be not.
+* DLT_REGISTER_APP is asynchronous. It may take some milliseconds to establish the IPC channel. Because of this, you might lose messages if you log immediately after registering. Typically this is not a problem, but may arise especially with simple examples.
==== Use one of the DLT macros or the DLT function interface:
-Here we use the macro interface of DLT
+Here we use the macro interface of DLT.
----
DLT_LOG(mycontext,DLT_LOG_WARN,DLT_INT(5),DLT_STRING("This is a warning"));