문제

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"

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top