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 Srinivas Chamarthi <sr...@gmail.com> on 2008/01/20 12:31:19 UTC
Compilation Errors
Hi,
I am trying to use the following code in my logger and am getting the below
error. any idea why am I getting this error ?
PropertyConfigurator::configure(new File("logger.properties"));
Error 15 error C2665: 'log4cxx::PropertyConfigurator::configure' :
none of the 2 overloads could convert all the argument types
thanks & regards,
Srinivas Chamarthi
Re: Compilation Errors
Posted by Curt Arnold <ca...@apache.org>.
On Jan 20, 2008, at 5:31 AM, Srinivas Chamarthi wrote:
> Hi,
>
> I am trying to use the following code in my logger and am getting
> the below error. any idea why am I getting this error ?
>
> PropertyConfigurator::configure(new File("logger.properties"));
>
>
> Error 15 error C2665:
> 'log4cxx::PropertyConfigurator::configure' : none of the 2 overloads
> could convert all the argument types
>
>
> thanks & regards,
> Srinivas Chamarthi
The two overloads are:
static void configure(const File& configFilename);
static void configure(helpers::Properties& properties);
and you are passing in a File*. In addition, you'd leak memory since
nothing would reclaim the allocated memory. Change the call to:
PropertyConfigurator::configure(File("logger.properties"));
and you'd should be fine.