Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging in a multiprocess application along with multithreading

I am looking for a logging facility for a multiprocess application which also contains multiple threads with in each process.

My current application is only multi-threaded and uses ACE_Message_Queue for sending logging events to the logger thread (The actual Log message is shared between application threads and the logger thread through a global array).

My new application contains multiple processes with multiple threads with in each process. How can I achieve a decent logging functionality in this scenario? Also looking to get rid of ACE in favor of Boost. My new application is supposed to run on Linux,Mac and Windows.

Thank you in advance.

like image 448
Rak Avatar asked Nov 03 '22 19:11

Rak


2 Answers

Boost.Log (v2) is very easy to set-up and pretty comprehensive. It is not in the boost library yet but it will be soon. You can use it as a simple logger, or write filters and customize the logging process and output. I am using it for a project and very very happy with it. See this question.

like image 140
perreal Avatar answered Nov 08 '22 04:11

perreal


Try to use log4cplus. It is an up-to date logging library allows using from multiple processes.

like image 41
Serge Z Avatar answered Nov 08 '22 05:11

Serge Z