diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/dlt/dlt_common.h | 4 | ||||
-rw-r--r-- | include/dlt/dlt_user.h | 7 | ||||
-rw-r--r-- | include/dlt/dlt_user_macros.h | 6 |
3 files changed, 17 insertions, 0 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h index 2824efd..59b58fa 100644 --- a/include/dlt/dlt_common.h +++ b/include/dlt/dlt_common.h @@ -76,7 +76,11 @@ */ #include <stdio.h> +#ifdef __linux__ #include <linux/limits.h> +#else +#include <limits.h> +#endif #if !defined(_MSC_VER) #include <unistd.h> diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h index 7b0aa8d..82e5e31 100644 --- a/include/dlt/dlt_user.h +++ b/include/dlt/dlt_user.h @@ -500,6 +500,13 @@ DltReturnValue dlt_register_app(const char *appid, const char * description); DltReturnValue dlt_unregister_app(void); /** + * Unregister an application in the daemon and also flushes the buffered logs. + * This function has to be called when finishing using an application. + * @return Value from DltReturnValue enum + */ +DltReturnValue dlt_unregister_app_flush_buffered_logs(void); + +/** * Register a context in the daemon. * This function has to be called before first usage of the context. * @param handle pointer to an object containing information about one special logging context diff --git a/include/dlt/dlt_user_macros.h b/include/dlt/dlt_user_macros.h index e1968a2..d50b335 100644 --- a/include/dlt/dlt_user_macros.h +++ b/include/dlt/dlt_user_macros.h @@ -121,6 +121,12 @@ (void)dlt_unregister_app();} while(0) /** + * Unregister application and flush the logs buffered in startup buffer if any. + */ +#define DLT_UNREGISTER_APP_FLUSH_BUFFERED_LOGS() do{\ + (void)dlt_unregister_app_flush_buffered_logs();} while(0) + +/** * Register context (with default log level and default trace status) * @param CONTEXT object containing information about one special logging context * @param CONTEXTID context id with maximal four characters |