On Sep 27, 2007, at 6:49 AM, [EMAIL PROTECTED] wrote:
Great Thanks to you both!
With your help, I managed to get the first example of log4cxx running.
the Second example (which should take an optional filename as
argument to read the config from) Fails, because the method wants a
File handler rather than a chararray)
Solution was as follows:
File* file = new File("test.txt");
PropertyConfigurator::configure(*file);
with this configuration, It reads the file test.txt from the
projects root directory and interpretes it correctly, allowing me
to configure appenders inside the file "test.txt"
At Last I can see a dim light at the horizon :)
Thanks again :)
Greetings,
Johannes Frank
There is no need to dynamically allocate File. You could do:
File file("test.txt");
PropertyConfigurator::configure(file);
or
PropertyConfigurator::configure(File( "test.txt"));
log4j does have a configure(String) method, so it would be reasonable
to add a configure(const std::string&) and configure(const
std::wstring&) methods to PropertyConfigurator.