From 694ea7ae6b85f893251c0e73241f1a55e8886b23 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Wed, 16 Dec 2015 17:19:47 +0100 Subject: [PATCH] Make cout/cerr usage more consistent --- pdns/pdnsutil.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 1198b673c..3d7075852 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -423,7 +423,7 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone) if (haveNSEC3 && isSecure && zone.wirelength() > 222) { numerrors++; - cerr<<"[Error] zone '" << zone.toStringNoDot() << "' has NSEC3 semantics but is too long to have the hash prepended. Zone name is " << zone.wirelength() << " bytes long, whereas the maximum is 222 bytes." << endl; + cout<<"[Error] zone '" << zone.toStringNoDot() << "' has NSEC3 semantics but is too long to have the hash prepended. Zone name is " << zone.wirelength() << " bytes long, whereas the maximum is 222 bytes." << endl; } // Check for delegation in parent zone @@ -437,7 +437,7 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone) while(B.get(rr)) ns |= (rr.qtype == QType::NS); if (!ns) { - cerr<<"[Error] No delegation for zone '"< meta; if (!B.getDomainMetadata(zname, metaKey, meta)) { - cout << "Failure enabling TSIG key " << name << " for " << zname << endl; + cerr << "Failure enabling TSIG key " << name << " for " << zname << endl; return 1; } bool found = false; @@ -2247,7 +2247,7 @@ seedRandom(::arg()["entropy-source"]); if (B.setDomainMetadata(zname, metaKey, meta)) { cout << "Enabled TSIG key " << name << " for " << zname << endl; } else { - cout << "Failure enabling TSIG key " << name << " for " << zname << endl; + cerr << "Failure enabling TSIG key " << name << " for " << zname << endl; return 1; } return 0; @@ -2271,7 +2271,7 @@ seedRandom(::arg()["entropy-source"]); UeberBackend B("default"); std::vector meta; if (!B.getDomainMetadata(zname, metaKey, meta)) { - cout << "Failure disabling TSIG key " << name << " for " << zname << endl; + cerr << "Failure disabling TSIG key " << name << " for " << zname << endl; return 1; } std::vector::iterator iter = meta.begin(); @@ -2280,7 +2280,7 @@ seedRandom(::arg()["entropy-source"]); if (B.setDomainMetadata(zname, metaKey, meta)) { cout << "Disabled TSIG key " << name << " for " << zname << endl; } else { - cout << "Failure disabling TSIG key " << name << " for " << zname << endl; + cerr << "Failure disabling TSIG key " << name << " for " << zname << endl; return 1; } return 0; -- 2.40.0