mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-04 11:54:59 +00:00
Make nib2cib quieter by default. Prints only fatal error messages.
Pass the -v flag to print warnings, and -vv or --verbose to print all messages. Closes #475.
This commit is contained in:
1 parent
32572844fd
commit
27e99344bd
4 files changed
+15
-9
No files matched your search
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* CPLog.j
|
||||
* Foundation
|
||||
* CPLog.js
|
||||
* Objective-J
|
||||
*
|
||||
* Created by Thomas Robinson.
|
||||
* Copyright 2008, 280 North, Inc.
|
||||
* Copyright 2008-2010, 280 North, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -40,6 +40,7 @@ exports.CPLogRegister = function(aProvider, aMaxLevel)
|
||||
{
|
||||
exports.CPLogRegisterRange(aProvider, CPLogLevels[0], aMaxLevel || CPLogLevels[CPLogLevels.length-1]);
|
||||
}
|
||||
|
||||
// Register a logger for a range of levels
|
||||
exports.CPLogRegisterRange = function(aProvider, aMinLevel, aMaxLevel)
|
||||
{
|
||||
|
||||
@@ -91,7 +91,7 @@ ConverterConversionException = @"ConverterConversionException";
|
||||
}
|
||||
catch(anException)
|
||||
{
|
||||
print(anException);
|
||||
CPLog.fatal(anException);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
if (self){
|
||||
_className = CP_NSMapClassName([aCoder decodeObjectForKey:@"NSClassName"]);
|
||||
print(":::"+_className);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -43,7 +42,7 @@
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{print("i-nit form coder");
|
||||
{
|
||||
return [self NS_initWithCoder:aCoder];
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,11 @@
|
||||
@import "Nib2CibKeyedUnarchiver.j"
|
||||
@import "Converter.j"
|
||||
|
||||
CPLogRegister(CPLogPrint, "fatal");
|
||||
|
||||
var FILE = require("file"),
|
||||
OS = require("os");
|
||||
|
||||
|
||||
CPLogRegister(CPLogPrint);
|
||||
|
||||
function printUsage()
|
||||
{
|
||||
print("usage: nib2cib INPUT_FILE [OUTPUT_FILE] [-F /path/to/required/framework] [-R path/to/resources]");
|
||||
@@ -101,6 +100,13 @@ function main(args)
|
||||
case "-R": [converter setResourcesPath:args[++index]];
|
||||
break;
|
||||
|
||||
case "-v": CPLogRegister(CPLogPrint, "warn");
|
||||
break;
|
||||
|
||||
case "-vv":
|
||||
case "--verbose": CPLogRegister(CPLogPrint, "trace");
|
||||
break;
|
||||
|
||||
default: if ([converter inputPath])
|
||||
[converter setOutputPath:args[index]];
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user