Hi,
I am trying to use the {registry} renderer in the target fileName field but i could not get it run.
My config settings are:
<nlog xmlns="
http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="f" xsi:type="File" fileName="${registry:key=HKLM\SOFTWARE\HH\Server:value=LogPath:defaultValue=d\:\temp}\log.txt"/>
</targets>
<rules>
<logger name="*" writeTo="f"/>
</rules>
</nlog>
So the config is quite simple and i don't know what is wrong. I gave default value for the registry value so if the registry key was not available then at least the default value should work. But it doesn't either. The given registry key and value are definitely exist in the registry.
I tried it in several formats, e.g. with doubled "\\" marks, without defaultValue, etc but nothing helped.
I use MS VS 2008 with .NET 3.5 in C#.
Can anybody give me some hints what's wrong?
Thanks in advance!
Cheers