-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CompoundLayout #1551
Add CompoundLayout #1551
Conversation
\0/ |
Current coverage is 76% (diff: 87%)@@ master #1551 diff @@
==========================================
Files 269 270 +1
Lines 16266 16293 +27
Methods 2605 2611 +6
Messages 0 0
Branches 1769 1771 +2
==========================================
+ Hits 12367 12393 +26
- Misses 3487 3501 +14
+ Partials 412 399 -13
|
@@ -1102,6 +1104,15 @@ private bool AddArrayItemFromElement(object o, NLogXmlElement element) | |||
return false; | |||
} | |||
|
|||
private object CreateArrayItemInstance(NLogXmlElement element, Type elementType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is OK, but maybe nice to add some (XML) comments.
Looks good, added some notes! |
Any idea if we could test this case: ( |
I think we almost ready to merge this. Can you add those on the wiki? Public is fine. Please add some examples and "introduced in NLog 4.3.6" |
I just added the documentation. https://github.com/NLog/NLog/wiki/Layouts |
Great! Thanks! An yes, the badge works automatically :) |
It's online! |
As per issue #1543 I added a CompoundLayout Layout to make it possible to use multiple nested heterogeneous layouts and create complex log entries.
Take as an example the following configuration:
Log entries would be like this:
myAmazingText: { "time": "2016-10-30 13:30:55.0000", "level": "INFO", "nested": { "message": "this is message", "exception": "test" } }