0

I know pantheios is thread-safe & I have used it fine but is it interprocess safe ?

Meaning could different module(differnt exes) logging to the same logging file safely at the same time?

If so do I need to set up any special setting for it ?

BTW :I didn't set anything special to pantheiso & it's thread-safe already by default.

RoundPi
  • 5,819
  • 7
  • 49
  • 75

1 Answers1

0

Concurrency of sink writes is controlled not by the library but by the back-end that is performing the writes. I doubt most (any?) stock back-ends are interprocess-safe by default - if you want that you could implement your own back-end, but it will likely kill the performance that you chose Pantheios for in the first place.

Steve Townsend
  • 53,498
  • 9
  • 91
  • 140
  • I am fairly new to Pantheios, could you explain a bit more ? – RoundPi Apr 23 '12 at 14:34
  • 1
    What back-end are you using? I would turn this question around and ask why you need to have different processes use the same logfile. If you don't really need that, don't do it. – Steve Townsend Apr 23 '12 at 14:45
  • I have a exe & a few dlls(some boost threads), I guess that would work fine WITHOUT interprocess. But I am just wondering woudl that work for interproces as well... – RoundPi Apr 23 '12 at 15:14
  • Unless you have multiple instances of the EXE running on the same machine there is no requirement for interprocess concurrency. DLLs live in the same process as the EXE hosting them, so normal thread safety is enough. – Steve Townsend Apr 23 '12 at 15:15
  • BTW do you know how to dynamically disable/enable pantheios logging (say reading a registration flag - true/false )? Is it just as simply as set the servrity level to DEBUG & not output debug information ? Or there is a more elegant way of doing that ? – RoundPi Apr 23 '12 at 15:27
  • There is info on how to change severity here : http://stackoverflow.com/questions/4277422/beginner-how-to-use-the-pantheios-logging-api-library-as-a-replacement-for-ifd – Steve Townsend Apr 23 '12 at 15:32