Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLT logging property not used #27

Open
kkretsch opened this issue Jun 9, 2021 · 0 comments
Open

DLT logging property not used #27

kkretsch opened this issue Jun 9, 2021 · 0 comments

Comments

@kkretsch
Copy link

kkretsch commented Jun 9, 2021

I tried to use DLT logging, but never got any lines until I changed the source.

In Logger.cpp is a line:

#ifdef USE_DLT
        if (useDlt_) {
            std::string app = Runtime::getProperty("LogApplication");

which always gets back an empty app object. The Runtime class only reads a predefined amount of values out of the commonapi.ini not including anything like LogApplication or LogContext.

And if I try to define those values in my client application like shown in some examples:

int main() {
std::cout << "Start of client main" << std::endl;
    CommonAPI::Runtime::setProperty("LogApplication", "CAPI");
    CommonAPI::Runtime::setProperty("LogContext", "SYNC");
std::cout << "End of setRuntime in client main" << std::endl;

I can see that the init function of the lib is executed before the very first lines of my own main function (what is the expected order, first init the base, then the top).

In init
prop LogApplication='
In register app
prop LogContext='
In register context
Start of client main
End of setRuntime in client main

All with the latest 3.2.0 tagged from this git.

Solution might be to add those two properties to the preloading steps of the Runtime class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant