can you provide valid syntax for colored console target to setup multiple highlight-row settings?
thanks!
"targets": {
"console": {
"type": "ColoredConsole",
"layout":"${longdate}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}",
??? (for multiple) "highlight-row":
{
"condition": "level == LogLevel.Error",
"foregroundColor": "Red"
}
},
Hi! Thanks for opening your first issue here! Please make sure to follow the issue template - so we could help you better!
Got it working? Please post the working example for others :)
Yes, I found the solution
"targets": {
"console": {
"type": "ColoredConsole",
"layout":"${longdate}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}",
"rowHighlightingRules" : [
{
"condition": "level == LogLevel.Debug",
"foregroundColor": "DarkGray"
},
{
"condition": "level == LogLevel.Info",
"foregroundColor": "Gray"
},
{
"condition": "level == LogLevel.Warn",
"foregroundColor": "Yellow"
},
{
"condition": "level == LogLevel.Error",
"foregroundColor": "Red"
},
{
"condition": "level == LogLevel.Fatal",
"foregroundColor": "Red",
"backgroundColor": "White"
}
]
Thanks!
Updated the advanced JSON-example to include this:
https://github.com/NLog/NLog.Extensions.Logging/wiki/Json-NLog-Config