Closed lilic closed 6 years ago
Feel like below is too much noise maybe
I haven't debugged the launcher enough to be able to tell whether it is too noisy or not, sorry :slightly_smiling_face: However, I find the current logs harder to "parse" than, for example:
level=info msg="ConfigMap [weave/configmaps] not found"
level=info msg="Secret [weave/secrets] created"
level=info msg="ConfigMap [weave/configmaps] not found"
level=info msg="ConfigMap [weave/configmaps] created"
level=error msg="ConfigMap [weave/configmaps/cloudwatch] should specify at least one AWS resource"
level=info msg="ConfigMap [weave/configmaps] updated"
or
level=info msg="ConfigMap not found" ns="weave" name="configmaps"
level=info msg="Secret created" ns="weave" name="secrets"
level=info msg="ConfigMap not found" ns="weave" name="configmaps"
level=info msg="ConfigMap created" ns="weave" name="configmaps"
level=error msg="ConfigMap should specify at least one AWS resource" ns="weave" name="configmaps" entry="cloudwatch"
level=info msg="ConfigMap updated" ns="weave" name="configmaps"
</nitpick>
Maybe a good way to make a difference between Info and Debug messages is whether we are doing something with the new Secret/CM or not. ie. detecting a new secret should be a Debug message, finding a valid cloudwatch secret/cm and the download URL should be Info messages.
Done, logs make more sense now. 👍 PTALA, thanks!
lgtm!
This just extracts into a separate cloudwatch.go file and also separates the tests as previously discussed with @dlespiau. And addresses minor logging comments that @marccarre left in the previous PR.
Not entirely certain how much we want to log, if at all the msgs about each time an event is triggered are those useful? Any suggestions welcome!
Feel like below is too much noise maybe: