-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
luci-base: allow direct syslog login for perror #4925
Conversation
Why is this needed? |
This change is useful mainly in case that someone is running luci without uhttpd. Usually in that case LuCI error messages are not sent to syslog.(see https://forum.openwrt.org/t/luci-code-that-handles-failed-and-success-login-results-to-syslog/83776 ) |
1016fb5
to
60bc8d1
Compare
From my point of view, that's OK. I can't find it now but can we document the new option somewhere? |
tbh I am not overly happy with the added complexity just to send two messages to syslog. Feel free to replace the stderr writes with nixio.syslog() invocations but do not introduce new options and alternative code paths for this. |
60bc8d1
to
1873fc8
Compare
Note: This change is relevant for systems that don't use uhttpd for LuCI. This log can be later used for fail2ban etc. Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
1873fc8
to
be8d749
Compare
I removed additional logic and replaced it with nixio.syslog. |
Thanks |
This PR replaces io.stderr:write with perror in dispatcher.lua and modifies perror in such way, that in can send error messages to stderr or syslog based on value stored in /etc/config/luci
Fixes #4877
Signed-off-by: Jan Pavlinec jan.pavlinec@nic.cz