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.

LogstashLogbackSink: Replace log.trace with call to HttpLogWriter.write()

See original GitHub issue

Being able to provide a custom HttpLogWriter for the LogstashLogbackSink and calling the respective write methods instead of log.trace would increase the configurability.

Detailed Description

Replace log.trace in LogstashLogbackSink with calls to a provided HttpLogWriter or the default one

Context

This change enables logging of requests on other levels, such as DEBUG, INFO, etc.

Your Environment

  • Version used: 2.2.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
whiskeysierracommented, Sep 22, 2020

But passing in HttpLogWriter is probably not the best approach (?), as it supports just a single argumet, and we’re adding two sibling fields to the log statement (the String message and the Marker http).

Since this was the answer to the original issue, I’ll close it now. We can continue the log level discussion here or create a new issue to track it.

1reaction
skjolbercommented, Sep 22, 2020

Would you consider making it configurable again? If someone already is doing a lot of logging and want to add request-/response logging, they might want another level than trace (i.e. info is fair) so it fits in with their current global log level (which is usually debug or info).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Replace logging of org.zalando.logbook.Logbook when web ...
Just define a BodyFilter bean with your replacement logic, something like this: @Bean public BodyFilter bodyFilter() { return merge( ...
Read more >
Logbook: HTTP Request and Response Logging Written in Java
The logbook logger must be configured to trace level in order to log the requests and responses. With Spring Boot 2 (using Logback)...
Read more >
Logbook/CHANGELOG and Logbook Releases (Page 3)
An extensible Java library for HTTP request and response logging ... LogstashLogbackSink: Replace log.trace with call to HttpLogWriter.write() #838 ...
Read more >
zalando logbook - Medium
Do you need http request and response logging without it polluting your business code? Use Zalando Logbook and add this aspect to your...
Read more >
Can Distributed Tracing Replace Logging? - Logz.io
We use logs to debug issues and understand how software works at the code level. After logging and debuggers, profilers are a dev's...
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