What does this string format mean in C++? [closed]
-
03-07-2021 - |
Frage
Ok this might be one of the not-so-smartest questions I have asked in awhile. Sadly, google led me to no answer (neither did stack).
In a C++ dll file, i have this line:
pSDB->setString("Logger\\AppLogger\\fileLoggerFilename", "rfa.{P}.log")
I, for the life of me, cannot find out what the {P} accurately represents. In the directory, I will get logs that look like: 'rfa.6702.log', 'rfa.6829.log', or 'rfa.7024.log'.
I notice they keep increasing. Does this legitimately mean anything in C++, or just a parameter set in the code?
EDIT:
This code is dealing with Reuters connections. The pSDB
is:
"rfa::config::StagingConfigDatabase *ConnectionManager"
Lösung
From here:
The Reuters library replaces the {p} string in the default file name with the UNIX Process ID when it creates the log file.
Andere Tipps
This has nothing to do with C++. C++ will never look inside your strings. Same is true for "%d" in printf. It is all a matter of what printf() is doing.
To answer your question, you need to refer to the actual object parsing your string.
This is not standard C++. It is defined in what looks like may be a logger library. You should look at the documentation for this parcitular library to find out {P}
means. In particular, look at the docs for the setString()
method in whatever class you used to declare pSDB
.