You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We have our own logger structure across all the services that has important features implemented through its methods.
Temporal logger injects some fields using With before execution of activity.
Another example is trace interceptor that also uses With to put trace/span ids as fields (key values).
The problem is that in some cases I receive not my Adapter structure, but "ReplayLogger". I can't extract original structure from ReplayLogger (it's private).
+ If other implementations/wrappers appear -- it will imposible to support.
Describe the solution you'd like
I want to have opportunity to get the original logger structure without losing all the fields injected previously.
So the solution can be EITHER, giving a method for getting my configured logger, passed at the configuration step, OR don't wrap the original logger anyhow during the execution (logger always keeps the same type, no decorators allowed).
Describe alternatives you've considered
Using global logger in case I couldn't assert type to my adapter. In this case I can lose important fields or must duplicate them myself from the activity. It's more complicated and expensive to do.
Additional context
How I try to get the original logger from the activity's context:
GetLogger method represents "global" clean logger
Difference in execution:
P.S: I'd gladly consider other solutions if you have such. The main goal is to be able to re-use SDK logger enhancements + to continue using project's standard implementation
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
We have our own logger structure across all the services that has important features implemented through its methods.
Temporal logger injects some fields using
With
before execution of activity.Another example is trace interceptor that also uses
With
to put trace/span ids as fields (key values).The problem is that in some cases I receive not my Adapter structure, but "ReplayLogger". I can't extract original structure from ReplayLogger (it's private).
+ If other implementations/wrappers appear -- it will imposible to support.
Describe the solution you'd like
I want to have opportunity to get the original logger structure without losing all the fields injected previously.
So the solution can be EITHER, giving a method for getting my configured logger, passed at the configuration step, OR don't wrap the original logger anyhow during the execution (logger always keeps the same type, no decorators allowed).
Describe alternatives you've considered
Using global logger in case I couldn't assert type to my adapter. In this case I can lose important fields or must duplicate them myself from the activity. It's more complicated and expensive to do.
Additional context
How I try to get the original logger from the activity's context:

GetLogger
method represents "global" clean loggerDifference in execution:

P.S: I'd gladly consider other solutions if you have such. The main goal is to be able to re-use SDK logger enhancements + to continue using project's standard implementation
The text was updated successfully, but these errors were encountered: