[genivi-dlt] Add dlt_user_is_logLevel_enabled API

Lipka, Christoph (ADITJ/SWG) clipka at jp.adit-jv.com
Fri May 20 04:19:41 EDT 2016


Oh, for whatever reason the “inline” disappeared in the patch… I anyway have to provide a new one. Thanks for the hints.

Best regards

Christoph Lipka
Software Group (ADITJ/SWG)

Tel. +81-(0)566 61-5124

From: genivi-diagnostic-log-and-trace-bounces at lists.genivi.org [mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org] On Behalf Of Jacques Guillou
Sent: Friday, May 20, 2016 5:17 PM
To: Alexander.AW.Wenzel at bmw.de
Cc: genivi-diagnostic-log-and-trace at lists.genivi.org; Lipka, Christoph (ADITJ/SWG)
Subject: Re: [genivi-dlt] Add dlt_user_is_logLevel_enabled API


Hello Christoph,

Just change your patch to implement the dlt_user_is_logLevel_enabled function  in the header and mark as as static and inline.  The compiler will inline the calls so that there is no overhead. The existing macros should call dlt_user_is_logLevel_enabled as well.

Best regards
Jacques
On 20 May 2016 10:00, <Alexander.AW.Wenzel at bmw.de<mailto:Alexander.AW.Wenzel at bmw.de>> wrote:
Hello Christoph,

The new API is good.

But I do not like to change the DLT logging Macros. The idea behind the Macros was performance, so inside the macro there should be no function call, if the logging for this log message is disabled.

If you agree, can you provide an updated patch with only the new API?
Can you also provide a Macro for the new API to be complete?
Extending the unit tests for the new API would be also good.

Best regards

    Alex

--
BMW Group
Alexander Wenzel
Architect. Connected Drive, I and C Syst.

Postanschrift:
80788 München

Tel: +49-89-382-54199<tel:%2B49-89-382-54199>
Mail: alexander.aw.wenzel at bmw.de<mailto:alexander.aw.wenzel at bmw.de>
Web: http://www.bmwgroup.com/
--------------------------------------------------------------------
Bayerische Motoren Werke Aktiengesellschaft
Vorstand: Harald Krüger (Vorsitzender),
Milagros Caiña Carreiro-Andree, Klaus Draeger,
Friedrich Eichiner, Klaus Fröhlich, Ian Robertson,
Peter Schwarzenbauer, Oliver Zipse.
Vorsitzender des Aufsichtsrats: Norbert Reithofer
Sitz und Registergericht: München HRB 42243
--------------------------------------------------------------------
Von: genivi-diagnostic-log-and-trace-bounces at lists.genivi.org<mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org> [mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org<mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org>] Im Auftrag von Lipka, Christoph (ADITJ/SWG)
Gesendet: Dienstag, 17. Mai 2016 04:53
An: genivi-diagnostic-log-and-trace at lists.genivi.org<mailto:genivi-diagnostic-log-and-trace at lists.genivi.org>
Betreff: [genivi-dlt] Add dlt_user_is_logLevel_enabled API

Dear all,

We like to propose a tiny extension for the DLT User API.
With the dlt_user_is_logLevel_enabled(DltContext *handle,DltLogLevelType log_level) API, an application developer can check, if the specified log level is enabled. This helps in situations where a wrapper is written around the DLT API to avoid the creation of log strings in case the message would not send to the DLT Daemon anyway.

Best regards

Christoph Lipka
Advanced Driver Information Technology
Software Group (ADITJ/SWG)
1-1 Showa-cho, Kariya-shi
Aichi-ken 448-8661, Japan
Tel. +81-(0)566 61-5124<tel:%2B81-%280%29566%2061-5124>
Fax +81-(0)566 25-4774<tel:%2B81-%280%29566%2025-4774>
clipka at jp.adit-jv.com<mailto:clipka at jp.adit-jv.com>

ADIT is joint venture company of DENSO Corporation and Bosch GmbH


_______________________________________________
genivi-diagnostic-log-and-trace mailing list
genivi-diagnostic-log-and-trace at lists.genivi.org<mailto:genivi-diagnostic-log-and-trace at lists.genivi.org>
https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genivi.org/pipermail/genivi-diagnostic-log-and-trace_lists.genivi.org/attachments/20160520/cca8aa1d/attachment.html>


More information about the genivi-diagnostic-log-and-trace mailing list