NLog Registry LayoutRenderer to output value from Windows Registry.
If having trouble with output, then check NLog InternalLogger for clues. See also Troubleshooting NLog
See the NLog Wiki for available options and examples.
NLog will only recognize type-alias registry
when loading from NLog.config
-file, if having added extension to NLog.config
-file:
<extensions>
<add assembly="NLog.WindowsRegistry"/>
</extensions>
Alternative register from code using fluent configuration API:
LogManager.Setup().SetupExtensions(ext => {
ext.RegisterLayoutRenderer<NLog.LayoutRenderers.RegistryLayoutRenderer>();
});