I received some post-v0.95 feedback saying that implementing async targets
should be somewhat easier in the config file.
Since async logging is something you might want to do quite often, I came up
with the following syntax idea:
Note that NLog permits multiple <targets/> and <rules /> sections, so if you
prefer just some of your targets to be async by default, you can write it
Under the hood, setting async="true" would wrap each target defined within
the <targets /> with an instance AsyncWrapper target. The AsyncWrapper would
get it's name from the wrapped target (which would be renamed to
originalName + "_sync"). This way all the rules would get routed to the
AsyncWrapper instead of the wrapped one.
I also have another idea to let you fully specify the wrapper that you want
to wrap others with. How about:
This would make all targets be wrapped with a chain of 3 wrappers, namely:
async, retrying and auto-flushing ones.
What do you think about the idea? Which version would you prefer? What if
both got implemented? Where do you think <default-wrappers> belongs? At the
<targets> level or at the <nlog> level? Isn't the whole idea too difficult
(I personally prefer simple things and I think that implementing just
async="true" would be sufficient for the 80% case and the other concept
<default-wrapper> would just add abstraction that I'm not convinced is