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

Show warning about logs in syslog in Web UI #5513

Closed
wants to merge 2 commits into from
Closed

Show warning about logs in syslog in Web UI #5513

wants to merge 2 commits into from

Conversation

zdohnal
Copy link
Contributor

@zdohnal zdohnal commented Feb 11, 2019

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?

@michaelrsweet
Copy link
Collaborator

I'd much rather just hide the log buttons when syslog/etc. are in use.

@michaelrsweet michaelrsweet self-assigned this Feb 12, 2019
@michaelrsweet michaelrsweet added the enhancement New feature or request label Feb 12, 2019
@michaelrsweet michaelrsweet added this to the Future milestone Feb 12, 2019
@zdohnal
Copy link
Contributor Author

zdohnal commented Feb 13, 2019

@michaelrsweet You're right, that's better idea, although I found two things:

  1. As I looked into code and if I understood it correctly, it would need to read cups-files.conf in cupsAdminGetServerSettings() function to get current setup of log location. Or move 'AccessLog/ErrorLog/PageLog' directives to cupsd.conf/create a new directive in cupsd.conf for it.

  2. It can be confusing when user will want to have CUPS error_log in syslog, but others in /var/log/cups directory - missing one or two 'View X log' buttons can look bad when the rest will be there.

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)?

@michaelrsweet
Copy link
Collaborator

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.

@zdohnal
Copy link
Contributor Author

zdohnal commented Feb 13, 2019

Ok, I'll prepare the removal of log buttons from web ui (even when /var/log/cups location is used).

michaelrsweet added a commit that referenced this pull request Feb 13, 2019
@michaelrsweet
Copy link
Collaborator

[master 0d94b8b] Remove log buttons from admin page since most Linux distros use systemd logging (Issue #5513)

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

Successfully merging this pull request may close these issues.

None yet

2 participants