fix my logger normalization -- it was still defaulting to INFO.
git-svn-id: https://svn.verisignlabs.com/jdnssec/tools/trunk@244 4cbd57fe-54e5-0310-bd9a-f30fe5ea5e6e
This commit is contained in:
parent
af2ae7401a
commit
645b8a1a60
@ -101,8 +101,7 @@ public class DSTool
|
||||
if (cli.hasOption('h')) usage();
|
||||
|
||||
Logger rootLogger = Logger.getLogger("");
|
||||
if (cli.hasOption('v'))
|
||||
{
|
||||
|
||||
int value = parseInt(cli.getOptionValue('v'), -1);
|
||||
switch (value)
|
||||
{
|
||||
@ -128,7 +127,7 @@ public class DSTool
|
||||
rootLogger.setLevel(Level.ALL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// I hate java.util.logging, btw.
|
||||
for (Handler h : rootLogger.getHandlers())
|
||||
{
|
||||
@ -161,8 +160,7 @@ public class DSTool
|
||||
|
||||
// print our own usage statement:
|
||||
f.printHelp(out, 75, "jdnssec-dstool [..options..] keyfile", null, opts,
|
||||
HelpFormatter.DEFAULT_LEFT_PAD,
|
||||
HelpFormatter.DEFAULT_DESC_PAD, null);
|
||||
HelpFormatter.DEFAULT_LEFT_PAD, HelpFormatter.DEFAULT_DESC_PAD, null);
|
||||
|
||||
out.flush();
|
||||
System.exit(64);
|
||||
@ -202,8 +200,7 @@ public class DSTool
|
||||
log.warning("DNSKEY is not an SEP-flagged key.");
|
||||
}
|
||||
|
||||
DSRecord ds = SignUtils.calculateDSRecord(dnskey, state.digest_id,
|
||||
dnskey.getTTL());
|
||||
DSRecord ds = SignUtils.calculateDSRecord(dnskey, state.digest_id, dnskey.getTTL());
|
||||
Record res = ds;
|
||||
|
||||
if (state.createDLV)
|
||||
|
@ -92,8 +92,7 @@ public class KeyGen
|
||||
OptionBuilder.withLongOpt("verbose");
|
||||
OptionBuilder.withArgName("level");
|
||||
OptionBuilder.withDescription("verbosity level -- 0 is silence, "
|
||||
+ "5 is debug information, 6 is trace information.\n"
|
||||
+ "default is level 5.");
|
||||
+ "5 is debug information, 6 is trace information.\n" + "default is level 5.");
|
||||
opts.addOption(OptionBuilder.create('v'));
|
||||
|
||||
OptionBuilder.hasArg();
|
||||
@ -118,8 +117,7 @@ public class KeyGen
|
||||
OptionBuilder.hasArg();
|
||||
OptionBuilder.withLongOpt("keydir");
|
||||
OptionBuilder.withArgName("dir");
|
||||
OptionBuilder.withDescription("place generated key files in this "
|
||||
+ "directory");
|
||||
OptionBuilder.withDescription("place generated key files in this " + "directory");
|
||||
opts.addOption(OptionBuilder.create('d'));
|
||||
|
||||
OptionBuilder.hasArg();
|
||||
@ -140,8 +138,7 @@ public class KeyGen
|
||||
if (cli.hasOption('h')) usage();
|
||||
|
||||
Logger rootLogger = Logger.getLogger("");
|
||||
if (cli.hasOption('v'))
|
||||
{
|
||||
|
||||
int value = parseInt(cli.getOptionValue('v'), -1);
|
||||
switch (value)
|
||||
{
|
||||
@ -167,7 +164,7 @@ public class KeyGen
|
||||
rootLogger.setLevel(Level.ALL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// I hate java.util.logging, btw.
|
||||
for (Handler h : rootLogger.getHandlers())
|
||||
{
|
||||
@ -257,8 +254,7 @@ public class KeyGen
|
||||
|
||||
// print our own usage statement:
|
||||
f.printHelp(out, 75, "jdnssec-keygen [..options..] name", null, opts,
|
||||
HelpFormatter.DEFAULT_LEFT_PAD,
|
||||
HelpFormatter.DEFAULT_DESC_PAD, null);
|
||||
HelpFormatter.DEFAULT_LEFT_PAD, HelpFormatter.DEFAULT_DESC_PAD, null);
|
||||
|
||||
out.flush();
|
||||
System.exit(64);
|
||||
@ -314,13 +310,13 @@ public class KeyGen
|
||||
if (state.zoneKey) flags |= DNSKEYRecord.Flags.ZONE_KEY;
|
||||
if (state.kskFlag) flags |= DNSKEYRecord.Flags.SEP_KEY;
|
||||
|
||||
log.fine("create key pair with (name = " + owner_name + ", ttl = "
|
||||
+ state.ttl + ", alg = " + state.algorithm + ", flags = " + flags
|
||||
+ ", length = " + state.keylength + ")");
|
||||
log.fine("create key pair with (name = " + owner_name + ", ttl = " + state.ttl
|
||||
+ ", alg = " + state.algorithm + ", flags = " + flags + ", length = "
|
||||
+ state.keylength + ")");
|
||||
|
||||
DnsKeyPair pair = signer.generateKey(owner_name, state.ttl, DClass.IN,
|
||||
state.algorithm, flags,
|
||||
state.keylength, state.useLargeE);
|
||||
state.algorithm, flags, state.keylength,
|
||||
state.useLargeE);
|
||||
|
||||
if (state.outputfile != null)
|
||||
{
|
||||
|
@ -71,8 +71,7 @@ public class KeyInfoTool
|
||||
OptionBuilder.withLongOpt("verbose");
|
||||
OptionBuilder.withArgName("level");
|
||||
OptionBuilder.withDescription("verbosity level -- 0 is silence, "
|
||||
+ "5 is debug information, 6 is trace information.\n"
|
||||
+ "default is level 5.");
|
||||
+ "5 is debug information, 6 is trace information.\n" + "default is level 5.");
|
||||
// Argument options
|
||||
opts.addOption(OptionBuilder.create('v'));
|
||||
|
||||
@ -92,8 +91,7 @@ public class KeyInfoTool
|
||||
if (cli.hasOption('h')) usage();
|
||||
|
||||
Logger rootLogger = Logger.getLogger("");
|
||||
if (cli.hasOption('v'))
|
||||
{
|
||||
|
||||
int value = parseInt(cli.getOptionValue('v'), -1);
|
||||
switch (value)
|
||||
{
|
||||
@ -119,7 +117,7 @@ public class KeyInfoTool
|
||||
rootLogger.setLevel(Level.ALL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// I hate java.util.logging, btw.
|
||||
for (Handler h : rootLogger.getHandlers())
|
||||
{
|
||||
@ -153,8 +151,7 @@ public class KeyInfoTool
|
||||
|
||||
// print our own usage statement:
|
||||
f.printHelp(out, 75, "jdnssec-keyinfo [..options..] keyfile", null, opts,
|
||||
HelpFormatter.DEFAULT_LEFT_PAD,
|
||||
HelpFormatter.DEFAULT_DESC_PAD, null);
|
||||
HelpFormatter.DEFAULT_LEFT_PAD, HelpFormatter.DEFAULT_DESC_PAD, null);
|
||||
|
||||
out.flush();
|
||||
System.exit(64);
|
||||
@ -218,23 +215,20 @@ public class KeyInfoTool
|
||||
System.out.println("Name: " + dnskey.getName());
|
||||
System.out.println("SEP: " + isSEP);
|
||||
|
||||
System.out.println("Algorithm: "
|
||||
+ dnskeyalg.algToString(dnskey.getAlgorithm()) + " ("
|
||||
+ dnskey.getAlgorithm() + ")");
|
||||
System.out.println("Algorithm: " + dnskeyalg.algToString(dnskey.getAlgorithm())
|
||||
+ " (" + dnskey.getAlgorithm() + ")");
|
||||
System.out.println("ID: " + dnskey.getFootprint());
|
||||
System.out.println("KeyFileBase: " + BINDKeyUtils.keyFileBase(key));
|
||||
int basetype = dnskeyalg.baseType(dnskey.getAlgorithm());
|
||||
switch (basetype)
|
||||
{
|
||||
case DnsKeyAlgorithm.RSA:
|
||||
{
|
||||
case DnsKeyAlgorithm.RSA: {
|
||||
RSAPublicKey pub = (RSAPublicKey) key.getPublic();
|
||||
System.out.println("RSA Public Exponent: " + pub.getPublicExponent());
|
||||
System.out.println("RSA Modulus: " + pub.getModulus());
|
||||
break;
|
||||
}
|
||||
case DnsKeyAlgorithm.DSA:
|
||||
{
|
||||
case DnsKeyAlgorithm.DSA: {
|
||||
DSAPublicKey pub = (DSAPublicKey) key.getPublic();
|
||||
System.out.println("DSA base (G): " + pub.getParams().getG());
|
||||
System.out.println("DSA prime (P): " + pub.getParams().getP());
|
||||
|
@ -136,8 +136,7 @@ public class SignKeyset
|
||||
if (cli.hasOption('h')) usage();
|
||||
|
||||
Logger rootLogger = Logger.getLogger("");
|
||||
if (cli.hasOption('v'))
|
||||
{
|
||||
|
||||
int value = parseInt(cli.getOptionValue('v'), -1);
|
||||
switch (value)
|
||||
{
|
||||
@ -163,7 +162,7 @@ public class SignKeyset
|
||||
rootLogger.setLevel(Level.ALL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// I hate java.util.logging, btw.
|
||||
for (Handler h : rootLogger.getHandlers())
|
||||
{
|
||||
|
@ -138,8 +138,7 @@ public class SignRRset
|
||||
if (cli.hasOption('h')) usage();
|
||||
|
||||
Logger rootLogger = Logger.getLogger("");
|
||||
if (cli.hasOption('v'))
|
||||
{
|
||||
|
||||
int value = parseInt(cli.getOptionValue('v'), -1);
|
||||
switch (value)
|
||||
{
|
||||
@ -165,7 +164,7 @@ public class SignRRset
|
||||
rootLogger.setLevel(Level.ALL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// I hate java.util.logging, btw.
|
||||
for (Handler h : rootLogger.getHandlers())
|
||||
{
|
||||
|
@ -218,8 +218,7 @@ public class SignZone
|
||||
if (cli.hasOption('h')) usage();
|
||||
|
||||
Logger rootLogger = Logger.getLogger("");
|
||||
if (cli.hasOption('v'))
|
||||
{
|
||||
|
||||
int value = parseInt(cli.getOptionValue('v'), -1);
|
||||
switch (value)
|
||||
{
|
||||
@ -245,7 +244,7 @@ public class SignZone
|
||||
rootLogger.setLevel(Level.ALL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// I hate java.util.logging, btw.
|
||||
for (Handler h : rootLogger.getHandlers())
|
||||
{
|
||||
|
@ -117,9 +117,8 @@ public class VerifyZone
|
||||
if (cli.hasOption('h')) usage();
|
||||
|
||||
Logger rootLogger = Logger.getLogger("");
|
||||
if (cli.hasOption('v'))
|
||||
{
|
||||
int value = parseInt(cli.getOptionValue('v'), -1);
|
||||
|
||||
switch (value)
|
||||
{
|
||||
case 0:
|
||||
@ -144,7 +143,7 @@ public class VerifyZone
|
||||
rootLogger.setLevel(Level.ALL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// I hate java.util.logging, btw.
|
||||
for (Handler h : rootLogger.getHandlers())
|
||||
{
|
||||
|
@ -85,8 +85,7 @@ public class ZoneFormat
|
||||
if (cli.hasOption('N')) assignNSEC3 = true;
|
||||
|
||||
Logger rootLogger = Logger.getLogger("");
|
||||
if (cli.hasOption('v'))
|
||||
{
|
||||
|
||||
int value = parseInt(cli.getOptionValue('v'), -1);
|
||||
switch (value)
|
||||
{
|
||||
@ -112,7 +111,7 @@ public class ZoneFormat
|
||||
rootLogger.setLevel(Level.ALL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// I hate java.util.logging, btw.
|
||||
for (Handler h : rootLogger.getHandlers())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user