question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Log4Net StackdriverAppender: Use %property values in custom labels

See original GitHub issue

Is 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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisdunelmcommented, Jun 26, 2019
1reaction
nbelleycommented, May 27, 2019

Any news on this? It would be required for us to put the %property{log4net:HostName} in one label to filter our logs.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found