File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ internal static IHostBuilder CreateHostBuilder(string[] args) =>
189
189
190
190
private static NLog . Logger ConfigureNLog ( string assemblyVersionNumber )
191
191
{
192
- LayoutRenderer . Register ( "servicename" , logEvent => Assembly . GetEntryAssembly ( ) ? . GetName ( ) . Name ) ;
192
+ LayoutRenderer . Register ( "servicename" , logEvent => typeof ( Program ) . Namespace ) ;
193
193
LayoutRenderer . Register ( "serviceversion" , logEvent => assemblyVersionNumber ) ;
194
194
LayoutRenderer . Register ( "machinename" , logEvent => Environment . MachineName ) ;
195
195
Original file line number Diff line number Diff line change 1
- <!--
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+
3
+ <!--
2
4
Copyright 2022 MONAI Consortium
3
5
4
6
Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +16,6 @@ See the License for the specific language governing permissions and
14
16
limitations under the License.
15
17
-->
16
18
17
- <?xml version="1.0" encoding="utf-8" ?>
18
19
<nlog xmlns =" http://www.nlog-project.org/schemas/NLog.xsd"
19
20
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
20
21
autoReload =" true"
@@ -47,7 +48,7 @@ limitations under the License.
47
48
<target xsi : type =" ColoredConsole" name =" lifetimeConsole" layout =" ${longdate}|${event-properties:item=EventId:whenEmpty=0}|${uppercase:${level}}|${logger}|${scopenested}|${message} ${exception:format=tostring}" />
48
49
49
50
<target name =" logstash" xsi : type =" Network" address =" ${environment:LOGSTASH_URL}" newLine =" true" >
50
- <layout xsi:type="JsonLayout" includeAllProperties ="true" >
51
+ <layout xsi : type =" JsonLayout" IncludeEventProperties =" true" IncludeScopeProperties = " true " >
51
52
<attribute name =" Tag" layout =" ${environment:ENVIRONMENT_NAME}" />
52
53
<attribute name =" ServiceName" layout =" ${servicename}" />
53
54
<attribute name =" ServiceVersion" layout =" ${serviceversion}" />
You can’t perform that action at this time.
0 commit comments