Verify Target-Ref working with SplitGroup with AppSettings.json
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- observability-sre
Research direction
Start by reproducing the AppSettings.json configuration with the SplitGroup target and its logconsole and email references, then compare its behavior with the XML target-ref example. Determine whether declaration order or dictionary sorting affects target resolution; done means the behavior is verified and any required change is identified.
Written by the indexing model from the issue text.
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: https://github.com/NLog/NLog.Extensions.Logging/issues/568#issuecomment-1030264661
- Dominant language
- C#
- Stars
- 404
- Forks
- 149
- Avg merge
- 10h 59m
- Merged PRs (30d)
- 18
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NLog/NLog.Extensions.Logging
-
feature
Difficulty 4/5 3-5 days Newbie friendliness 45/100
NLog/NLog.Extensions.Logging#865 ·
Maintainers usually reply within 1 day
-
feature up-for-grabs
Difficulty 3/5 1-2 days Newbie friendliness 35/100
NLog/NLog.Extensions.Logging#729 · 1 comment ·
Maintainers usually reply within 1 day
All issues in NLog/NLog.Extensions.Logging
Similar issues
-
[中] 更新器下载缓存从不清理Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Remove duplicate Vimeo DI registration; use NimblePros.Vimeo AddVimeoServices and upgrade packageOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DevBetterCom/DevBetterWeb#1486 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NimblePros/eShopOnWeb#333 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Natvs/Nt.Automaton#33 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100