File tree 2 files changed +25
-2
lines changed
2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
27
27
} ;
28
28
_logger . LogInformation ( "{@Structured} {@Scalar}" , structured , "Scalar Value" ) ;
29
29
30
+
31
+ // Logging a property with dots in its name to AdditionalColumn3
32
+ // but treat it as unstructured according to configuration in AdditionalColumns in appsettings.json
33
+ _logger . LogInformation ( "Non-structured property with dot-name to AdditionalColumn3 {@NonstructuredProperty.WithNameContainingDots.Name}" ,
34
+ new Random ( ) . Next ( ) . ToString ( ) ) ;
35
+
30
36
while ( ! stoppingToken . IsCancellationRequested )
31
37
{
32
38
_logger . LogInformation ( "Worker running at: {time}. CustomProperty1: {CustomProperty1}" ,
Original file line number Diff line number Diff line change 27
27
"columnName" : " Timestamp" ,
28
28
"convertToUtc" : false
29
29
},
30
- "additionalColumns " : [
30
+ "customColumns " : [
31
31
{
32
32
"columnName" : " AdditionalColumn1" ,
33
33
"propertyName" : " CustomProperty1" ,
37
37
"columnName" : " AdditionalColumn2" ,
38
38
"propertyName" : " Structured.Name" ,
39
39
"dataType" : " 12"
40
+ },
41
+ {
42
+ "columnName" : " AdditionalColumn3" ,
43
+ "propertyName" : " NonstructuredProperty.WithNameContainingDots.Name" ,
44
+ "resolveHierarchicalPropertyName" : false ,
45
+ "dataType" : " 12"
40
46
}
41
47
]
42
48
},
63
69
"columnName" : " Timestamp" ,
64
70
"convertToUtc" : false
65
71
},
66
- "additionalColumns " : [
72
+ "customColumns " : [
67
73
{
68
74
"columnName" : " AdditionalColumn1" ,
69
75
"propertyName" : " CustomProperty1" ,
70
76
"dataType" : " 12"
77
+ },
78
+ {
79
+ "columnName" : " AdditionalColumn2" ,
80
+ "propertyName" : " Structured.Name" ,
81
+ "dataType" : " 12"
82
+ },
83
+ {
84
+ "columnName" : " AdditionalColumn3" ,
85
+ "propertyName" : " NonstructuredProperty.WithNameContainingDots.Name" ,
86
+ "resolveHierarchicalPropertyName" : false ,
87
+ "dataType" : " 12"
71
88
}
72
89
]
73
90
}
You can’t perform that action at this time.
0 commit comments