RIPE-NCC / ripe-atlas-probe-measurements

RIPE Atlas probe measurement source code
Other
41 stars 18 forks source link

eooqd: convert logging to crondlog helper #13

Open Ansuel opened 2 years ago

Ansuel commented 2 years ago

Hi, In an effort to make this tool less verbose, I'm proposing a change to make the loglevel configurable. Since everything is run with cron it would make sense to use crondlog helper to actually log stuff.

This does exactly that. Also I notice that in eooqd we have mixed helper (report and cronlog) and the loglevel is never init resulting in getting everything logged.

Ansuel commented 2 years ago

@michel-stam Sorry for the tag spam yesterday and today...

This is a POC (in the sense that it does work and I tested it on my side) but I notice report is also used in 2 other source file... Doing the change seems easy enough (only problem is arbitrary choosing the correct level) but it seems a good idea to have the level configurable in each bin and use a unified helper.

Remember that having debug log is O.K. for container use but not ok if you run other thing on a router for example... In the current state the entire log is filled with atlas debug log making even difficult to catch if there are actual error.

If all of this gets positive feedback I would also propose to add to the ATLAS script a way to configure the default cron log level from the arch scripts. (I will eventually push a pr for that if the busybox changes are approved)