Using log4net and/or log4cxx in mixed systems

C

CD

Hello All,

We have some legacy logging infrastructure, which I would like to
replace with log4net. However, many subsystems are written in C++.

I can see some options here:
(1) Use log4net and write a C++ facade to it, which would be used by
the C++ applications. To me this is the easiest solution but I am
concerned with the performance when logging from the C++
applications.
(2) Use log4cxx and write a wrapper from C#. This is more complicated
to me because I have a custom appender calling a WCF service in
another box for persistence.
(3) use both. This would imply a lot of repeated code and
maintenance.

Did I miss anything?

I would appreciate your comments and suggestions.

Kind regards
CD
 
A

Arne Vajhøj

CD said:
We have some legacy logging infrastructure, which I would like to
replace with log4net. However, many subsystems are written in C++.

I can see some options here:
(1) Use log4net and write a C++ facade to it, which would be used by
the C++ applications. To me this is the easiest solution but I am
concerned with the performance when logging from the C++
applications.
(2) Use log4cxx and write a wrapper from C#. This is more complicated
to me because I have a custom appender calling a WCF service in
another box for persistence.
(3) use both. This would imply a lot of repeated code and
maintenance.

Did I miss anything?

I would go for #1, because of the argument in #2.

It cost a little bit to switch between managed and
unmanaged, but if you are using an appender that calls
a WCF service to persist on a remote node, then I don't
think you should worry about it - it will be insignificant
compared to the time spend in that appender.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top