-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
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.
kheaactua
Metadata
Metadata
Assignees
Labels
No labels