From: Zdenek Dohnal Date: Fri, 1 Sep 2023 15:11:54 +0000 (+0200) Subject: scheduler/conf.c: Print to stderr if we don't open cups-files.conf X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db9cecdd932e58c51d2d659f63415ad47d151717;p=thirdparty%2Fcups.git scheduler/conf.c: Print to stderr if we don't open cups-files.conf In case cupsd can't open the cups-files.conf, the error message is lost if journal and syslog don't exist or work on system (usually in containers). Log the error into stderr at this place to get the error message if needed. --- diff --git a/scheduler/conf.c b/scheduler/conf.c index b185351622..4fa7eb1df0 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -811,11 +811,7 @@ cupsdReadConfiguration(void) cupsdLogMessage(CUPSD_LOG_INFO, "No %s, using defaults.", CupsFilesFile); else { -#ifdef HAVE_SYSTEMD_SD_JOURNAL_H - sd_journal_print(LOG_ERR, "Unable to open \"%s\" - %s", CupsFilesFile, strerror(errno)); -#else - syslog(LOG_LPR, "Unable to open \"%s\" - %s", CupsFilesFile, strerror(errno)); -#endif /* HAVE_SYSTEMD_SD_JOURNAL_H */ + fprintf(stderr, "Unable to read \"%s\" - %s\n", CupsFilesFile, strerror(errno)); return (0); }