Closed alextatarinov closed 2 years ago
I'm a little worried about this solution insofar as it mutates the action indefinitely, and the action may be used in later messages... So will see if I can figure out a different fix.
Closing in favor of new PR, which will be based on this one.
I'm a little worried about this solution insofar as it mutates the action indefinitely, and the action may be used in later messages... So will see if I can figure out a different fix.
You are right, haven't thought about it. Well, hope you'll find another way!
P.S. Can't we just return the old action._logger
after emitting the error log?
Refs: https://github.com/itamarst/eliot/issues/476
As it turned out, adding try/except won't do the trick, since the exception is actually never raised. Instead, infinite recursion occurs, eating all CPU and RAM. This is the only idea I had to make it work without substantial changes. I am not fully aware of the consequences of adding
action._logger = logger
, but at least the tests seem to pass.