Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent syslog priorities #228

Open
s-hamann opened this issue Jan 12, 2025 · 0 comments
Open

Inconsistent syslog priorities #228

s-hamann opened this issue Jan 12, 2025 · 0 comments

Comments

@s-hamann
Copy link

s-hamann commented Jan 12, 2025

I recently had a device which exhausted my DHCPv4 pool. It took me a while to debug this, since there was nothing from odhcpd in the logs. The loglevel for odhcpd is set to 4 (WARN).

Of course odhcpd logs a lack of addresses - but a NOTICE level, so I didn't get it with my settings.

syslog(LOG_NOTICE, "Can't assign any IP address -> address space is full");

I think this is somewhat inconsistent with other messages at this level. In particular the following seem pretty normal and not "requiring special handling".

syslog(LOG_NOTICE, "Sending a RA on %s", iface->name);

syslog(LOG_NOTICE, "Sending RS to %s", iface->name);

syslog(LOG_NOTICE, "Got a RA on %s", iface->name);

syslog(LOG_NOTICE, "Forward a RA on %s", c->name);

I believe "address space is full" is a fairly severe error condition (because address assignment fails and devices can't join the network) and should probably be logged at WARN or even ERROR. However, this messages was changed from WARN to NOTICE in d60f0a6 in response to #150.

RA and RS status messages seem less important to me and I suggest logging them at INFO. Note that this was the case for "Sending a RA" until it was promoted to NOTICE in 207f8e0 (probably for consistence with other messages).
#191 even suggests DEBUG for "Sending a RA".

Implementing both changes I suggest would leave the NOTICE level pretty much unused and therefore useless. I'm fine with doing any one of them. I just want to be able to configure odhcpd to be silent unless something is broken - which currently is not quite possible. I think I set the loglevel to WARN because the RA messages I got every few minutes when I tried NOTICE.

@dedeckeh Since you made those changes to the log priorities back in 2019, maybe you can shed some light on the rationale and the best way forward?

I'll be happy to make a PR for the changes, if that's any help to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant