-
-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
Sviatoslav Bychkov edited this page Dec 5, 2024
·
2 revisions
The source generator has a few configurable properties that control its behavior. These properties are passed as build configurations and modify the generated code in different ways..
Property Name | Description | DefaultValue |
---|---|---|
build_property.AutoLoggerMessageGenerator_GenerateInterceptorAttribute |
Specifies whether the interceptor attribute should be generated | true |
build_property.AutoLoggerMessageGenerator_GenerateSkipEnabledCheck |
Sets LogProperties.SkipEnabledCheck to true. Determines whether to skip the logging-enabled check before invoking the log method. |
true |
build_property.AutoLoggerMessageGenerator_GenerateOmitReferenceName |
Sets LogProperties.OmitReferenceName to true. This indicates whether to prefix the name of the parameter or property to the generated name of each tag being logged. |
false |
build_property.AutoLoggerMessageGenerator_GenerateSkipNullProperties |
Sets LogProperties.SkipNullProperties to true. Specifies whether null properties should be omitted from the log entries. |
false |
build_property.AutoLoggerMessageGenerator_GenerateTransitive |
Sets LogProperties.Transitive to true. This indicates that each property of any complex objects are expanded individually. |
false |
To configure one of these properties in your project, add the following line to the .editorconfig file.
build_property.AutoLoggerMessageGenerator_GenerateInterceptorAttribute = true
or in your project configuration file (specific or global)
<PropertyGroup>
...
<AutoLoggerMessageGenerator_GenerateInterceptorAttribute>true</AutoLoggerMessageGenerator_GenerateInterceptorAttribute>
</PropertyGroup>