make console output clearer
This commit is contained in:
parent
63da0773ae
commit
a511979cd1
|
@ -61,7 +61,7 @@ Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
|
|||
var trackedContract = self.deployTracker.getContract(contract.className, contract.code, contract.args);
|
||||
|
||||
if (trackedContract && this.web3.eth.getCode(trackedContract.address) !== "0x") {
|
||||
self.logger.info(contract.className + " already deployed " + trackedContract.address);
|
||||
self.logger.info(contract.className.cyan + " already deployed at ".green + trackedContract.address.cyan);
|
||||
contract.deployedAddress = trackedContract.address;
|
||||
self.logger.contractsState(self.contractsManager.contractsState());
|
||||
return callback();
|
||||
|
@ -118,12 +118,12 @@ Deploy.prototype.deployContract = function(contract, params, callback) {
|
|||
gasPrice: contract.gasPrice
|
||||
});
|
||||
|
||||
self.logger.info("deploying " + contract.className + " with " + contract.gas + " gas");
|
||||
self.logger.info("deploying " + contract.className.cyan + " with ".green + contract.gas + " gas".green);
|
||||
contractParams.push(function(err, transaction) {
|
||||
self.logger.contractsState(self.contractsManager.contractsState());
|
||||
|
||||
if (err) {
|
||||
self.logger.error("error deploying contract: " + contract.className);
|
||||
self.logger.error("error deploying contract: " + contract.className.cyan);
|
||||
var errMsg = err.toString();
|
||||
if (errMsg === 'Error: The contract code couldn\'t be stored, please check your gas amount.') {
|
||||
errMsg = 'The contract code couldn\'t be stored, out of gas or constructor error';
|
||||
|
@ -132,7 +132,7 @@ Deploy.prototype.deployContract = function(contract, params, callback) {
|
|||
contract.error = errMsg;
|
||||
return callback(new Error(err));
|
||||
} else if (transaction.address !== undefined) {
|
||||
self.logger.info(contract.className + " deployed at " + transaction.address);
|
||||
self.logger.info(contract.className.cyan + " deployed at ".green + transaction.address.cyan);
|
||||
contract.deployedAddress = transaction.address;
|
||||
contract.transactionHash = transaction.transactionHash;
|
||||
return callback(null, transaction.address);
|
||||
|
|
|
@ -358,7 +358,7 @@ Dashboard.prototype.layoutCmd = function() {
|
|||
this.input.on('submit', function(data) {
|
||||
if (data !== '') {
|
||||
self.history.addCommand(data);
|
||||
self.logText.log('console> ' + data);
|
||||
self.logText.log('console> '.bold.green + data);
|
||||
self.console.executeCmd(data, function(result) {
|
||||
self.logText.log(result);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue