Discussion:
Can I config process_id to log file name in the .ini setting file using Boost.Log?
(too old to reply)
Bruce
2017-02-04 05:25:01 UTC
Permalink
Hi,


I am using Boost.Log to output log file and using .ini file to config it.
start my_app.exe 1
start my_app.exe 2
But currently only the first instance output the log content and the second one can't get the log file because the two exe uses the same log file. So I need to tell the app to use the different log file.


So I want to config the .ini file to add process_id to the output file name, but I don't know how?


I want to config the ini file like this but it failed:-(
FileName="./log/mylog_%ProcessID%.log"


Is there a way to add precess id to the output file name?


Thanks.

Loading...