aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFJob_config.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-06-18 16:33:27 +0200
committerJay Berkenbilt <ejb@ql.org>2022-06-18 16:38:50 +0200
commite0720eaa78a56dafe5f5e572387b3a0cc8c88ec9 (patch)
treeb4a0c2b0a38c723a5e33c06e1f4122e983fdb146 /libqpdf/QPDFJob_config.cc
parent83be2191b4f3eb8906160d61f61cae48532ee651 (diff)
downloadqpdf-e0720eaa78a56dafe5f5e572387b3a0cc8c88ec9.tar.zst
Use the default logger for other writes to stdout/stderr
When there is no context for writing output or error messages, use the default logger.
Diffstat (limited to 'libqpdf/QPDFJob_config.cc')
-rw-r--r--libqpdf/QPDFJob_config.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/libqpdf/QPDFJob_config.cc b/libqpdf/QPDFJob_config.cc
index 5a343f79..b9b53ebd 100644
--- a/libqpdf/QPDFJob_config.cc
+++ b/libqpdf/QPDFJob_config.cc
@@ -1,5 +1,6 @@
#include <qpdf/QPDFJob.hh>
+#include <qpdf/QPDFLogger.hh>
#include <qpdf/QTC.hh>
#include <qpdf/QUtil.hh>
@@ -648,9 +649,10 @@ QPDFJob::Config::passwordFile(std::string const& parameter)
o.m->password = QUtil::make_shared_cstr(lines.front());
if (lines.size() > 1) {
- std::cerr << this->o.m->message_prefix
- << ": WARNING: all but the first line of"
- << " the password file are ignored" << std::endl;
+ *QPDFLogger::defaultLogger()->getError()
+ << this->o.m->message_prefix
+ << ": WARNING: all but the first line of"
+ << " the password file are ignored\n";
}
}
return this;