Is it possible to make a new instance of Logbook based on the existing one with some modifications?
amseager opened this issue · 4 comments
amseager commented
Suppose I created a Logbook instance with Logbook.builder()....build()
method (or took it from Spring's logbook auto config).
Now I need to create another one with overriding e.g. bodyFilter()
. I plan to use it only for specific externall calls. Can I use the original object as a base for a new one?
whiskeysierra commented
If you created the original instance manually, then I'd just extract the
common parts into a function and call that function twice with different
filters eg.
…On Thu, 9 Mar 2023, 14:36 amseager, ***@***.***> wrote:
Suppose I created a Logbook instance with Logbook.builder()....build()
method (or took it from Spring's logbook auto config).
Now I need to create another one with overriding e.g. bodyFilter(). I
plan to use it only for specific externall calls. Can I use the original
object as a base for a new one?
—
Reply to this email directly, view it on GitHub
<#1449>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADI7HIVX3D4NBVCBKH2Z7DW3HMHDANCNFSM6AAAAAAVVECTGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
amseager commented
I just thought that it could be possible to have smth like Logbook.builder().with(existingLogbook).....build()
as we have in many other libraries