Monday, 15 April 2013

C# application log4net log file not created when used in C++/CLI -



C# application log4net log file not created when used in C++/CLI -

i've written c# dll - foo.dll - uses log4net logging. dll used in c++ application via c++\cli wrapper. c++ application works perfectly, log file not created. when utilize dll in testing c# application (that uses original c# dll) log file create without problems.

this configuration set in foo.dll.config:

<configsections> <section name="log4net" type="log4net.config.log4netconfigurationsectionhandler, log4net"/> </configsections> <log4net> <root> <level value="debug" /> <appender-ref ref="rollingfileappender" /> </root> <appender name="rollingfileappender" type="log4net.appender.rollingfileappender"> <file value="d:\\foo.log" /> <appendtofile value="true" /> <rollingstyle value="size" /> <maxsizerollbackups value="5" /> <maximumfilesize value="10mb" /> <staticlogfilename value="true" /> <layout type="log4net.layout.patternlayout"> <conversionpattern value="%date [%thread] %level - %message%newline" /> </layout> </appender> </log4net>

other configuration read without problems foo.dll.config file , c++ application has writing permissions log directory.

any thought i'm missing here?

i re-write comment answer.

you must seek define app.config file c++ application (not dll itself), , include on log4net configuration.

c# c++ dll c++-cli log4net

No comments:

Post a Comment