You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by "Zmuda, Matthew" <Ma...@tvworks.com> on 2009/09/24 16:57:39 UTC
Are log4j and log4cxx configuration files identical?
I am coding a JNI project and planning to use log4j in java portion and log4cxx in c++. Can the same configurations files be used for both?
If I change logging level at runtime in Java will the changes also be made in c++ logger?
Finally can both Java and C++ loggers log to the same file?
Thanks,
Matt Zmuda
Software Developer - Tools Group
TVWorks - Platform Division, London, Canada
(519) 963-4304
Re: Are log4j and log4cxx configuration files identical?
Posted by Va...@sophia.inria.fr.
On Thursday 24 September 2009 17:57:39 Zmuda, Matthew wrote:
> I am coding a JNI project and planning to use log4j in java portion and
> log4cxx in c++. Can the same configurations files be used for both?
>
The same configuration file format is used for both but probably you will have
different class names for C++ and Java. So you will need to define loggers depending
on the class, package etc. Probably you can define a naming scheme for classes so
the loggers apply to both parts.
> If I change logging level at runtime in Java will the changes also be made
> in c++ logger?
See above
> Finally can both Java and C++ loggers log to the same file?
Yes I thinks so, by defining appenders that log to the same file.
Scroll down for appenders
http://logging.apache.org/log4cxx/index.html
http://logging.apache.org/log4j/1.2/manual.html
Attached is a file I'm using for logging, I think it's self explanatory.
>
> Thanks,
>
> Matt Zmuda
> Software Developer - Tools Group
> TVWorks - Platform Division, London, Canada
> (519) 963-4304
>