NLog2 for Silverlight not working

1 message Options
Embed this post
Permalink
Adam Hearn

NLog2 for Silverlight not working

Reply Threaded More More options
Print post
Permalink
Jaroslaw, I grabbed the NLog2 trunk and got a build for silverlight completed (some files seemed to be missing and I had to use a different constructor for the StackFrame class but the build seemed to hang together). I tried using an nlog.config file (the way we do with normal .NET application) and even though all expected files were deployed in the xap file, no logging was generated. Debugging the app I found the logging level was not enabled so I assumed that configuration from an external file wasn't [yet] working so I tried manual configuration in code. However this didn't work out as I get a crash 'in the depths' as a property (AmbientPropertyFactory) was still null.

After a quick look at the code I see the reason it's null.... it's commented out in the code!
// _allFactories.Add(AmbientPropertyFactory = new Factory<LayoutRenderer, AmbientPropertyAttribute>(false));

I had thought about creating a Silverlight project for NLog1 but thought some of the NLog2 features sounded good to have for the future. Of course I realise NLog2 is not released but has there been any progress on NLog2 [for Silverlight] or should I drop back to the NLog1 codebase?

Thanks in advance!