logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Compilation Errors
Date Sun, 20 Jan 2008 14:38:51 GMT

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.

Mime
View raw message