project-flogo / core

Flogo Core is the core flogo library used create and extend Flogo applications.
BSD 3-Clause "New" or "Revised" License
109 stars 55 forks source link

Print start/stop trigger logs when only engine have triggers #223

Closed lixingwang closed 4 years ago

lixingwang commented 4 years ago

What kind of change does this PR introduce? (check one with "x")

[] Bugfix
[] Feature
[] Code style update (formatting, local variables)
[] Refactoring (no functional changes, no api changes)
[*] Other... Please describe: Enhance code

Fixes: # The changes are very simple. just added below

if len(a.triggers) > 0 {
//starting triggeres
//Stoping triggers
}

What is the current behavior? Today, no matter engine have triggers or not engine print below logs

2020-10-07T20:20:52.098Z INFO [flogo] - Starting Triggers...
2020-10-07T20:20:52.098Z INFO [flogo] - Triggers Started

It is fine with a normal engine as it should have at least one trigger but for a tester engine that just has an empty engine that does not have triggers, and tester engine only for testing flows to avoid confusion we should hide those logs when there are no triggers. What is the new behavior?

Don't print the above logs when there is no trigger in the engine.