Log4Net StackdriverAppender: Use %property values in custom labels
See original GitHub issueIs your feature request related to a problem? Please describe. Attempting to use %property syntax on custom label values. It shows up in Stackdriver like this:
labels: {
Key: "%property{AccountID}"
...
}
I want the value inserted at runtime, similar to what I can do with the message:
<conversionPattern value="%property{AccountID}
…
Describe the solution you’d like I’d like to label my logs with some context from the application.
<customLabel>
<key value="AccountID" />
<value value="%property{AccountID}" />
</customLabel>
Describe alternatives you’ve considered Put the dynamic data into the log message directly.
Additional context
- I think this is where a replacement would happen.
- I saw that adding new labels dynamically was prevented completely in #1036. I would just be looking to change the values dynamically.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
replacing a custom label leads to no more log entries #1036
When we add a second custom label, the logs stop working. log. ... Log4Net StackdriverAppender: Use %property values in custom labels #2983.
Read more >Class GoogleStackdriverAppender (4.0.0) | .NET client library
Construct a Google Stackdriver appender. ... Property Value. Type, Description ... Enables PatternLayout use in custom labels.
Read more >Log4Net, how to add a custom field (variable) to my logging
The property will hold the value of Variables.IDVERSION at that moment. It won't automagically track updates to the Variables.IDVERSION variable ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bryanroth It’s already in beta on nuget: https://www.nuget.org/packages/Google.Cloud.Logging.Log4Net/2.4.0-beta01
Any news on this? It would be required for us to put the %property{log4net:HostName} in one label to filter our logs.