-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Labels
Description
Could be nice if one could do this:
{
"NLog": {
"throwConfigExceptions": true,
"targets": {
"logconsole": {
"type": "Console"
},
"email": {
"type": "mail"
},
"bothTargets": {
"type": "SplitGroup",
"targets": {
"logconsole": null,
"email": null
}
}
},
"rules": [
{
"logger": "*",
"minLevel": "Info",
"writeTo": "bothTargets"
}
]
}
}
Maybe one will get "cheated" by the automatic sorting of dictionary-items, so the splitgroup must be named so it comes "last", after the other target-names to ensure they have been parsed/declared.
Similar to this:
<targets>
<target name='email' xsi:type='mail' />
<target name='logconsole' xsi:type='console' />
<target name="bothTargets" xsi:type="SplitGroup">
<target-ref name="logconsole" />
<target-ref name="email" />
</target>
</targets>
See also: #568 (comment)