Skip to content

Commit

Permalink
feat: default to silent unles DEBUG=agoric
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Mar 19, 2020
1 parent 81a8950 commit 2cf5cd8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/agoric-cli/test/test-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test('workflow', async t => {
startP.cp.stdout.on('data', chunk => {
// console.log('stdout:', chunk.toString());
stdoutStr += chunk.toString();
if (stdoutStr.match(/^swingset running$/m)) {
if (stdoutStr.match(/(^|:\s+)swingset running$/m)) {
successfulStart = true;
startP.cp.kill('SIGINT');
}
Expand Down
2 changes: 2 additions & 0 deletions packages/cosmic-swingset/bin/ag-solo
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
const process = require('process');
const esmRequire = require('esm')(module);

// Configure logs.
esmRequire('../lib/anylogger-agoric.js');
const solo = esmRequire('../lib/ag-solo/main.js').default;

solo(process.argv[1], process.argv.splice(2)).then(
Expand Down
6 changes: 5 additions & 1 deletion packages/cosmic-swingset/lib/ag-chain-cosmos
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const path = require('path');
const agcc = require('bindings')('agcosmosdaemon.node');
const esmRequire = require('esm')(module);

esmRequire('./agoric-anylogger');
const anylogger = require('anylogger');
const log = anylogger('ag-chain-cosmos');

const main = esmRequire('./chain-main.js').default;

main(process.argv[1], process.argv.splice(2), {
Expand All @@ -13,7 +17,7 @@ main(process.argv[1], process.argv.splice(2), {
}).then(
_res => 0,
rej => {
console.log(`error running ag-chain-cosmos:`, rej);
log.error(`error running ag-chain-cosmos:`, rej);
process.exit(1);
},
);

0 comments on commit 2cf5cd8

Please sign in to comment.