Making SingleFieldAppendingMarker#getFieldValue() package-private broke log assertions
See original GitHub issueDescription
I am maintaining https://github.com/dm-drogeriemarkt/log-capture/ which we use to test our logging.
I also allows to assert logging of keyValue, see https://github.com/dm-drogeriemarkt/log-capture/#key-value-from-logstash
Making SingleFieldAppendingMarker#getFieldValue()
package-private broke that for me, because I used it for those assertions. I don’t see a viable replacement, although I might be overlooking something.
Expected behavior
I am aware that is kind of a https://xkcd.com/1172/ situation 😉, but I would like a way to be still able to use those assertions. If everything else fails, I can mis-use toStringSelf() and filter out the key, but I’d rather not do that.
- logstash-logback-encoder 7.1
Issue Analytics
- State:
- Created a year ago
- Comments:12
Top Results From Across the Web
Broken usage of capsys for inspecting logging output #8622
What happened: We have one unit test that uses capsys to make assertions about emitted logs: dask/dataframe/io/tests/test_sql.py Add a ...
Read more >How to do a JUnit assert on a message in a logger
Basically, you create your own Appender and add it to the logger you ... Assert.assertThat; public class MyTest { @Test public void test()...
Read more >Kohi #003: Logging and Assertions (Kohi Vulkan ... - YouTube
Kohi #003: Logging and Assertions (Kohi Vulkan Game Engine Serie... ... is part of a series where we make a game engine in...
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 FreeTop 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
Top GitHub Comments
Fwiw, we also need the actual value and not JSON for our assertions @philsttr, since the whole point of those assertions is that they are based on content and should work regardless of log formatting/encoding.
So I would also be happy if there was a way to get to the contents.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don’t have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.