Show warning about logs in syslog in Web UI#5513
Conversation
|
I'd much rather just hide the log buttons when syslog/etc. are in use. |
|
@michaelrsweet You're right, that's better idea, although I found two things:
What is your opinion on these two points? Is it acceptable to read cups-files.conf, set new cgi variable, change admin template a little and set "INPUT TYPE={?variable}" according cgi variable (SUBMIT/HIDDEN)? |
|
Really, given the current (default) use of systemd logging on most Linux distros and the disabling of the web interface by default, my personal preference is just to remove the buttons completely from the admin page. |
|
Ok, I'll prepare the removal of log buttons from web ui (even when /var/log/cups location is used). |
…md logging (Issue #5513)
Hi Mike!
I set all cupsd logs to be in system log (journal), but it breaks viewing logs in CUPS web ui - it ends with 'Not Found', which can be confusing for users.
I tried to focus on the issue and solve it in the pull request - I introduced new file in CUPS_CACHEDIR, which will contain warning message (file is created and the message is written there during reading configuration - if configuration changes in the way there is no logs in syslog, file is deleted):
'The log has been moved to system log. Please consult your logging system for logs.'
CGI binary then gets the file instead of original log file (if CUPS is built with correct features - systemd or vsyslog and the logging is set to syslog).
Viewing logs in web ui shows warning instead of 'Not Found'. Is it acceptable behavior and could it be added to the project?