Tune verbosity of logging "Lazy appliance check"

Created on 15 January 2025, 6 days ago

Problem/Motivation

When troubleshooting ECA models under development, I bump the ECA's log level up to DEBUG, in order to see the full details of the assertions and logic as it works through that model. This is extremely helpful, but the information is difficult to find because the DEBUG log is *flooded* with "Lazy appliance check" messages, that obscures the useful messages.

I think there are a few ways to approach this, and I confess that I don't fully grok the "lazy appliance" aspect of ECA as yet, but for my purposes it would be helpful to drop these messages entirely, or filter them out of the log view somehow.

Alternately, perhaps there's room for more "shades of grey" in the loglevel that messages are being reported as- it seems like a *lot* gets added when I go to INFO to DEBUG, but not much (or anything?) new is added going from WARN to INFO, for example. If all the relevant messages were logged at the INFO level, I could ignore these extra-verbose "lazy appliance" messages easily.

Steps to reproduce

1. Go to admin/config/workflow/eca/settings, and set the Log level to DEBUG, then;
2. trigger a model you have enabled by causing whatever event is required.
3. Come back to the admin/config/workflow/eca/log view, and;
4. Witness the myriad "Lazy appliance check" messages that have sprung up :)

Proposed resolution

In the immediate, I intend to submit a patch that simply removes the line that logs these "lazy appliance" checks. This is selfish but useful to others who find themselves where I am in the short term. It's also possible these log messages are otherwise unnecessary or could be reduced by a maintainer who understands the internals of ECA better :)

That being said, on the assumption that these log messages *are* useful to somebody some of the time, I would propose one of two solutions (or possibly both would make sense):

1. Review the log messages throughout ECA and refactor the levels that they emit at, such that "logical reasoning" as Events fire and Model logic is applied is visible at the INFO level, and more verbose output like "lazy appliance checks" are at DEBUG
2. Improve the filtering on the admin/config/workflow/eca/log screen to make it easier to ignore this extra verbosity. This might amount to adding a "message does not contain" textbox to complement the "message contains" one, perhaps?

Either way will require some effort and attention of course. I don't have the bandwidth to take it on at the moment, so my apologies for the quick and dirty approach I suggest for now.

Remaining tasks

TBD

User interface changes

Less verbose logging of ECA messages :)

Feature request
Status

Active

Version

1.1

Component

Code

Created by

🇨🇦Canada spiderman Halifax, NS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @spiderman
  • 🇨🇦Canada spiderman Halifax, NS

    The attached patch simply drops the clause which logs a message when a Lazy appliance check does NOT apply. This seems to be the primary source of the verbosity. There is a corresponding log message when the check DOES apply, which I've left intact, as it seems more obviously useful, and for my purpose doesn't seem to actually happen a lot.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thank you @spiderman for your contribution. A couple of things, though:

    • This is for version 1.1 which is pretty old and not supported much longer. In 2.x this code doesn't exist anymore and therefore can't be applied.
    • Contributions with patches won't move far, only issue forks and MRs should be used as those will run tests and also make collaboration so much smoother for everyone.
    • And last but not least, a small tip on how you could debug is a more focused way: leave the settings at the error level for logs, and within your model, use the Set ECA log level action to turn on debugging at a specific place in your model to just get debug messages for that particular area.

    Do you know the webprofiler module? That comes with some pretty helpful ECA debugging support as well.

    That said, I guess that this feature request will probably not be landing in ECA.

  • 🇨🇦Canada spiderman Halifax, NS

    Hi @jurgenhaas, many thanks for these helpful comments. I realized as I was submitting the issue that we are on a quite old version right now, so I recognize this doesn't stand much chance of getting in. I've started looking into upgrading, but we're relying on the Classic Modeler as it stands, and I can't tell if it's still supported in the most recent versions yet (will investigate) and I don't want to convert all our models if I can help it.

    Anyway, thanks for blowing my mind about the Set ECA log level action for more focused debugging! I think this will be super helpful, and may actually obviate the need for this patch. In any case, I'm happy to close this if it's only helpful to me, and ideally stop pulling the patch from my end shortly as well :)

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks for your feedback. Regarding the classic modeller, there is not much maintenance going into it any longer. But there is some good news for you: the bpmn_io modeller can open those models for you, and it will automatically convert them for you. So, the migration path should be seamless.

Production build 0.71.5 2024