Every cronjob logs an error

Every cronjob that I run logs an error.

* * * * * /usr/bin/wireguard_watchdog leads to:

cron.err crond[9024]: USER root pid 9184 cmd /usr/bin/wireguard_watchdog

This seems to have been an issue for over 14 years :joy: Not that it's super important, but running a cronjob every minute trashes the logfile.

1 Like

I know. Install syslog-ng and filter that text!

1 Like

Change option cronloglevel '5' in /etc/config/system to level 9.

See: https://openwrt.org/docs/guide-user/base-system/system_configuration#system_section

2 Likes

To be clear (since others haven't clearly noted it yet), the normal logging level in OpenWrt is Err.

There isn't an error.

2 Likes

It ain't a bug, it’s a feature.

Strange feature if you as me but I don’t think anyone really want to change it, mostly because the never ending worthless small flash routers must live on!?

2 Likes

If it ain't an error, why does it say error? Sounds like an error to me :man_shrugging:

1 Like

Good question.

That's simply the "logging level" in *nix-like systems. I'll have to search for the discussion where a developer noted there's only a few other options (e.g., "warn"). Other options imply severity.

Another option is to build OpenWrt firmware where it's capable of those log levels.

2 Likes

That's weird. Most systems allow for an "info" log level.

2 Likes

probably related to https://github.com/openwrt/luci/issues/7315

Question: would a crash or firewall warning (for example) be considered info?

The post was literally one down from what I linked:

1 Like

The reason I switch to micrond if I need to use cronjobs on OpenWrt.

1 Like

That seem to be a solution with busybox settings, but it requires building from source code.

2 Likes