Skip to content

Commit 3694505

Browse files
author
Per Kops
committed
chore: update template parameters in source-generated logging in select logging classes to correct case
1 parent a0943e5 commit 3694505

File tree

9 files changed

+105
-105
lines changed

9 files changed

+105
-105
lines changed

sample/src/IoTEdgeModules/modules/opcpublishernodemanagermodule/OpcPublisherNodeManagerModuleServiceLoggerMessages.cs

+16-16
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public sealed partial class OpcPublisherNodeManagerModuleService
1010
[LoggerMessage(
1111
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleStarted,
1212
Level = LogLevel.Trace,
13-
Message = "{callerMethodName}({callerLineNumber}) - Successfully started module '{moduleName}'.")]
13+
Message = "{CallerMethodName}({CallerLineNumber}) - Successfully started module '{ModuleName}'.")]
1414
private partial void LogModuleStarted(
1515
string moduleName,
1616
[CallerMemberName] string callerMethodName = "",
@@ -19,7 +19,7 @@ private partial void LogModuleStarted(
1919
[LoggerMessage(
2020
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleStopping,
2121
Level = LogLevel.Trace,
22-
Message = "{callerMethodName}({callerLineNumber}) - Stopping module '{moduleName}'.")]
22+
Message = "{CallerMethodName}({CallerLineNumber}) - Stopping module '{ModuleName}'.")]
2323
private partial void LogModuleStopping(
2424
string moduleName,
2525
[CallerMemberName] string callerMethodName = "",
@@ -28,7 +28,7 @@ private partial void LogModuleStopping(
2828
[LoggerMessage(
2929
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleStopped,
3030
Level = LogLevel.Trace,
31-
Message = "{callerMethodName}({callerLineNumber}) - Successfully stopped module '{moduleName}'.")]
31+
Message = "{CallerMethodName}({CallerLineNumber}) - Successfully stopped module '{ModuleName}'.")]
3232
private partial void LogModuleStopped(
3333
string moduleName,
3434
[CallerMemberName] string callerMethodName = "",
@@ -37,7 +37,7 @@ private partial void LogModuleStopped(
3737
[LoggerMessage(
3838
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleClientStarted,
3939
Level = LogLevel.Trace,
40-
Message = "{callerMethodName}({callerLineNumber}) - Successfully started moduleClient for module '{moduleName}'.")]
40+
Message = "{CallerMethodName}({CallerLineNumber}) - Successfully started moduleClient for module '{ModuleName}'.")]
4141
private partial void LogModuleClientStarted(
4242
string moduleName,
4343
[CallerMemberName] string callerMethodName = "",
@@ -46,7 +46,7 @@ private partial void LogModuleClientStarted(
4646
[LoggerMessage(
4747
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleClientStopped,
4848
Level = LogLevel.Trace,
49-
Message = "{callerMethodName}({callerLineNumber}) - Successfully stopped moduleClient for module '{moduleName}'.")]
49+
Message = "{CallerMethodName}({CallerLineNumber}) - Successfully stopped moduleClient for module '{ModuleName}'.")]
5050
private partial void LogModuleClientStopped(
5151
string moduleName,
5252
[CallerMemberName] string callerMethodName = "",
@@ -55,7 +55,7 @@ private partial void LogModuleClientStopped(
5555
[LoggerMessage(
5656
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ConnectionStatusChange,
5757
Level = LogLevel.Trace,
58-
Message = "{callerMethodName}({callerLineNumber}) - Connection changed - status: '{status}', reason: '{reason}'.")]
58+
Message = "{CallerMethodName}({CallerLineNumber}) - Connection changed - status: '{Status}', reason: '{Reason}'.")]
5959
private partial void LogConnectionStatusChange(
6060
ConnectionStatus status,
6161
ConnectionStatusChangeReason reason,
@@ -65,7 +65,7 @@ private partial void LogConnectionStatusChange(
6565
[LoggerMessage(
6666
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodCalled,
6767
Level = LogLevel.Trace,
68-
Message = "{callerMethodName}({callerLineNumber}) - Method '{methodName}' was called on module '{moduleName}'.")]
68+
Message = "{CallerMethodName}({CallerLineNumber}) - Method '{MethodName}' was called on module '{ModuleName}'.")]
6969
private partial void LogMethodCalled(
7070
string methodName,
7171
string moduleName,
@@ -75,7 +75,7 @@ private partial void LogMethodCalled(
7575
[LoggerMessage(
7676
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodCallCompleted,
7777
Level = LogLevel.Trace,
78-
Message = "{callerMethodName}({callerLineNumber}) - Method '{methodName}' completed on module '{moduleName}'.")]
78+
Message = "{CallerMethodName}({CallerLineNumber}) - Method '{MethodName}' completed on module '{ModuleName}'.")]
7979
private partial void LogMethodCallCompleted(
8080
string methodName,
8181
string moduleName,
@@ -85,7 +85,7 @@ private partial void LogMethodCallCompleted(
8585
[LoggerMessage(
8686
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestEmpty,
8787
Level = LogLevel.Error,
88-
Message = "{callerMethodName}({callerLineNumber}) - No data in request when method '{methodName}' was called on module '{moduleName}'.")]
88+
Message = "{CallerMethodName}({CallerLineNumber}) - No data in request when method '{MethodName}' was called on module '{ModuleName}'.")]
8989
private partial void LogMethodRequestEmpty(
9090
string methodName,
9191
string moduleName,
@@ -95,7 +95,7 @@ private partial void LogMethodRequestEmpty(
9595
[LoggerMessage(
9696
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestDeserializationError,
9797
Level = LogLevel.Error,
98-
Message = "{callerMethodName}({callerLineNumber}) - Could not deserialize request when method '{methodName}' was called on module '{moduleName}': '{errorMessage}'.")]
98+
Message = "{CallerMethodName}({CallerLineNumber}) - Could not deserialize request when method '{MethodName}' was called on module '{ModuleName}': '{ErrorMessage}'.")]
9999
private partial void LogMethodRequestDeserializationError(
100100
string methodName,
101101
string moduleName,
@@ -106,7 +106,7 @@ private partial void LogMethodRequestDeserializationError(
106106
[LoggerMessage(
107107
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestUriParsingError,
108108
Level = LogLevel.Error,
109-
Message = "{callerMethodName}({callerLineNumber}) - Could not parse url '{url}' from request when method '{methodName}' was called on module '{moduleName}': '{errorMessage}'.")]
109+
Message = "{CallerMethodName}({CallerLineNumber}) - Could not parse url '{Url}' from request when method '{MethodName}' was called on module '{ModuleName}': '{ErrorMessage}'.")]
110110
private partial void LogMethodRequestUriParsingError(
111111
string url,
112112
string methodName,
@@ -118,7 +118,7 @@ private partial void LogMethodRequestUriParsingError(
118118
[LoggerMessage(
119119
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestUriFormatExceptionError,
120120
Level = LogLevel.Error,
121-
Message = "{callerMethodName}({callerLineNumber}) - Exception while parsing endpointUrl '{endpointUrl}': '{errorMessage}'")]
121+
Message = "{CallerMethodName}({CallerLineNumber}) - Exception while parsing endpointUrl '{EndpointUrl}': '{ErrorMessage}'")]
122122
private partial void LogMethodRequestUriFormatExceptionError(
123123
string endpointUrl,
124124
string errorMessage,
@@ -128,7 +128,7 @@ private partial void LogMethodRequestUriFormatExceptionError(
128128
[LoggerMessage(
129129
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestError,
130130
Level = LogLevel.Error,
131-
Message = "{callerMethodName}({callerLineNumber}) - Could not process request when method '{methodName}' was called on module '{moduleName}': '{errorMessage}'.")]
131+
Message = "{CallerMethodName}({CallerLineNumber}) - Could not process request when method '{MethodName}' was called on module '{ModuleName}': '{ErrorMessage}'.")]
132132
private partial void LogMethodRequestError(
133133
string methodName,
134134
string moduleName,
@@ -139,7 +139,7 @@ private partial void LogMethodRequestError(
139139
[LoggerMessage(
140140
EventId = LoggingEventIdConstants.ConfigurationFileMissing,
141141
Level = LogLevel.Error,
142-
Message = "{callerMethodName}({callerLineNumber}) - The node configuration file '{publisherNodeConfigurationFilename}' does not exist.")]
142+
Message = "{CallerMethodName}({CallerLineNumber}) - The node configuration file '{PublisherNodeConfigurationFilename}' does not exist.")]
143143
private partial void LogConfigurationFileNotFound(
144144
string publisherNodeConfigurationFilename,
145145
[CallerMemberName] string callerMethodName = "",
@@ -148,7 +148,7 @@ private partial void LogConfigurationFileNotFound(
148148
[LoggerMessage(
149149
EventId = LoggingEventIdConstants.ConfigurationFileLoadError,
150150
Level = LogLevel.Error,
151-
Message = "{callerMethodName}({callerLineNumber}) - Loading of the node configuration file failed. Check the file exist and have correct syntax: '{errorMessage}'.")]
151+
Message = "{CallerMethodName}({CallerLineNumber}) - Loading of the node configuration file failed. Check the file exist and have correct syntax: '{ErrorMessage}'.")]
152152
private partial void LogConfigurationFileLoadError(
153153
string errorMessage,
154154
[CallerMemberName] string callerMethodName = "",
@@ -157,7 +157,7 @@ private partial void LogConfigurationFileLoadError(
157157
[LoggerMessage(
158158
EventId = LoggingEventIdConstants.ConfigurationFileWriteError,
159159
Level = LogLevel.Error,
160-
Message = "{callerMethodName}({callerLineNumber}) - Writing to the node configuration file failed. Check the file exist and have correct syntax: '{errorMessage}'.")]
160+
Message = "{CallerMethodName}({CallerLineNumber}) - Writing to the node configuration file failed. Check the file exist and have correct syntax: '{ErrorMessage}'.")]
161161
private partial void LogConfigurationFileWriteError(
162162
string errorMessage,
163163
[CallerMemberName] string callerMethodName = "",

sample/src/IoTEdgeModules/modules/simulationmodule/Jobs/PulsJobLoggerMessages.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public sealed partial class PulsJob
1111
[LoggerMessage(
1212
EventId = LoggingEventIdConstants.JobStarted,
1313
Level = LogLevel.Information,
14-
Message = "{callerMethodName}({callerLineNumber}) - '{jobName}' started.")]
14+
Message = "{CallerMethodName}({CallerLineNumber}) - '{JobName}' started.")]
1515
private partial void LogJobStarted(
1616
string jobName,
1717
[CallerMemberName] string callerMethodName = "",
@@ -20,7 +20,7 @@ private partial void LogJobStarted(
2020
[LoggerMessage(
2121
EventId = LoggingEventIdConstants.JobEnded,
2222
Level = LogLevel.Information,
23-
Message = "{callerMethodName}({callerLineNumber}) - '{jobName}' ended.")]
23+
Message = "{CallerMethodName}({CallerLineNumber}) - '{JobName}' ended.")]
2424
private partial void LogJobEnded(
2525
string jobName,
2626
[CallerMemberName] string callerMethodName = "",
@@ -29,7 +29,7 @@ private partial void LogJobEnded(
2929
[LoggerMessage(
3030
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.FailedToAcquireModuleClient,
3131
Level = LogLevel.Error,
32-
Message = "{callerMethodName}({callerLineNumber}) - Failed to acquire ModuleClient for the job '{jobName}'.")]
32+
Message = "{CallerMethodName}({CallerLineNumber}) - Failed to acquire ModuleClient for the job '{JobName}'.")]
3333
private partial void LogFailedToAcquireModuleClient(
3434
string jobName,
3535
[CallerMemberName] string callerMethodName = "",
@@ -38,7 +38,7 @@ private partial void LogFailedToAcquireModuleClient(
3838
[LoggerMessage(
3939
EventId = LoggingEventIdConstants.UnhandledExceptionInJob,
4040
Level = LogLevel.Error,
41-
Message = "{callerMethodName}({callerLineNumber}) - Unhandled exception occurred in job '{jobName}' - '{errorMessage}'.")]
41+
Message = "{CallerMethodName}({CallerLineNumber}) - Unhandled exception occurred in job '{JobName}' - '{ErrorMessage}'.")]
4242
private partial void LogUnhandledExceptionInJob(
4343
string jobName,
4444
string? errorMessage,

sample/src/IoTEdgeModules/modules/simulationmodule/SimulationModuleServiceLoggerMessages.cs

+12-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public sealed partial class SimulationModuleService
1010
[LoggerMessage(
1111
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleStarted,
1212
Level = LogLevel.Trace,
13-
Message = "{callerMethodName}({callerLineNumber}) - Successfully started module '{moduleName}'.")]
13+
Message = "{CallerMethodName}({CallerLineNumber}) - Successfully started module '{ModuleName}'.")]
1414
private partial void LogModuleStarted(
1515
string moduleName,
1616
[CallerMemberName] string callerMethodName = "",
@@ -19,7 +19,7 @@ private partial void LogModuleStarted(
1919
[LoggerMessage(
2020
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleStopping,
2121
Level = LogLevel.Trace,
22-
Message = "{callerMethodName}({callerLineNumber}) - Stopping module '{moduleName}'.")]
22+
Message = "{CallerMethodName}({CallerLineNumber}) - Stopping module '{ModuleName}'.")]
2323
private partial void LogModuleStopping(
2424
string moduleName,
2525
[CallerMemberName] string callerMethodName = "",
@@ -28,7 +28,7 @@ private partial void LogModuleStopping(
2828
[LoggerMessage(
2929
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleStopped,
3030
Level = LogLevel.Trace,
31-
Message = "{callerMethodName}({callerLineNumber}) - Successfully stopped module '{moduleName}'.")]
31+
Message = "{CallerMethodName}({CallerLineNumber}) - Successfully stopped module '{ModuleName}'.")]
3232
private partial void LogModuleStopped(
3333
string moduleName,
3434
[CallerMemberName] string callerMethodName = "",
@@ -37,7 +37,7 @@ private partial void LogModuleStopped(
3737
[LoggerMessage(
3838
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleClientStarted,
3939
Level = LogLevel.Trace,
40-
Message = "{callerMethodName}({callerLineNumber}) - Successfully started moduleClient for module '{moduleName}'.")]
40+
Message = "{CallerMethodName}({CallerLineNumber}) - Successfully started moduleClient for module '{ModuleName}'.")]
4141
private partial void LogModuleClientStarted(
4242
string moduleName,
4343
[CallerMemberName] string callerMethodName = "",
@@ -46,7 +46,7 @@ private partial void LogModuleClientStarted(
4646
[LoggerMessage(
4747
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ModuleClientStopped,
4848
Level = LogLevel.Trace,
49-
Message = "{callerMethodName}({callerLineNumber}) - Successfully stopped moduleClient for module '{moduleName}'.")]
49+
Message = "{CallerMethodName}({CallerLineNumber}) - Successfully stopped moduleClient for module '{ModuleName}'.")]
5050
private partial void LogModuleClientStopped(
5151
string moduleName,
5252
[CallerMemberName] string callerMethodName = "",
@@ -55,7 +55,7 @@ private partial void LogModuleClientStopped(
5555
[LoggerMessage(
5656
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.ConnectionStatusChange,
5757
Level = LogLevel.Trace,
58-
Message = "{callerMethodName}({callerLineNumber}) - Connection changed - status: '{status}', reason: '{reason}'.")]
58+
Message = "{CallerMethodName}({CallerLineNumber}) - Connection changed - status: '{Status}', reason: '{Reason}'.")]
5959
private partial void LogConnectionStatusChange(
6060
ConnectionStatus status,
6161
ConnectionStatusChangeReason reason,
@@ -65,7 +65,7 @@ private partial void LogConnectionStatusChange(
6565
[LoggerMessage(
6666
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodCalled,
6767
Level = LogLevel.Trace,
68-
Message = "{callerMethodName}({callerLineNumber}) - Method '{methodName}' was called on module '{moduleName}'.")]
68+
Message = "{CallerMethodName}({CallerLineNumber}) - Method '{MethodName}' was called on module '{ModuleName}'.")]
6969
private partial void LogMethodCalled(
7070
string methodName,
7171
string moduleName,
@@ -75,7 +75,7 @@ private partial void LogMethodCalled(
7575
[LoggerMessage(
7676
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodCallCompleted,
7777
Level = LogLevel.Trace,
78-
Message = "{callerMethodName}({callerLineNumber}) - Method '{methodName}' completed on module '{moduleName}'.")]
78+
Message = "{CallerMethodName}({CallerLineNumber}) - Method '{MethodName}' completed on module '{ModuleName}'.")]
7979
private partial void LogMethodCallCompleted(
8080
string methodName,
8181
string moduleName,
@@ -85,7 +85,7 @@ private partial void LogMethodCallCompleted(
8585
[LoggerMessage(
8686
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestEmpty,
8787
Level = LogLevel.Error,
88-
Message = "{callerMethodName}({callerLineNumber}) - No data in request when method '{methodName}' was called on module '{moduleName}'.")]
88+
Message = "{CallerMethodName}({CallerLineNumber}) - No data in request when method '{MethodName}' was called on module '{ModuleName}'.")]
8989
private partial void LogMethodRequestEmpty(
9090
string methodName,
9191
string moduleName,
@@ -95,7 +95,7 @@ private partial void LogMethodRequestEmpty(
9595
[LoggerMessage(
9696
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestDeserializationError,
9797
Level = LogLevel.Error,
98-
Message = "{callerMethodName}({callerLineNumber}) - Could not deserialize request when method '{methodName}' was called on module '{moduleName}': '{errorMessage}'.")]
98+
Message = "{CallerMethodName}({CallerLineNumber}) - Could not deserialize request when method '{MethodName}' was called on module '{ModuleName}': '{ErrorMessage}'.")]
9999
private partial void LogMethodRequestDeserializationError(
100100
string methodName,
101101
string moduleName,
@@ -106,7 +106,7 @@ private partial void LogMethodRequestDeserializationError(
106106
[LoggerMessage(
107107
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestUriParsingError,
108108
Level = LogLevel.Error,
109-
Message = "{callerMethodName}({callerLineNumber}) - Could not parse url '{url}' from request when method '{methodName}' was called on module '{moduleName}': '{errorMessage}'.")]
109+
Message = "{CallerMethodName}({CallerLineNumber}) - Could not parse url '{url}' from request when method '{MethodName}' was called on module '{ModuleName}': '{ErrorMessage}'.")]
110110
private partial void LogMethodRequestUriParsingError(
111111
string url,
112112
string methodName,
@@ -118,7 +118,7 @@ private partial void LogMethodRequestUriParsingError(
118118
[LoggerMessage(
119119
EventId = Atc.Azure.IoTEdge.LoggingEventIdConstants.MethodRequestError,
120120
Level = LogLevel.Error,
121-
Message = "{callerMethodName}({callerLineNumber}) - Could not process request when method '{methodName}' was called on module '{moduleName}': '{errorMessage}'.")]
121+
Message = "{CallerMethodName}({CallerLineNumber}) - Could not process request when method '{MethodName}' was called on module '{ModuleName}': '{ErrorMessage}'.")]
122122
private partial void LogMethodRequestError(
123123
string methodName,
124124
string moduleName,

0 commit comments

Comments
 (0)