Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger output level "stdout" "stderr" #30

Merged
merged 5 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cicd/test_script/ca-gen.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash -ve
#! /bin/bash -ve

export NODE_ENV=development # testing development production
export NODE_ENV=production # testing development production
export BDK_NETWORK_NAME=shell-network-ca
export DOCKER_LOGGING=true
export BDK_ORG_TYPE=peer

ICA_DOMAIN_BEN='ica.ben.cathaybc.com'
Expand Down
5 changes: 2 additions & 3 deletions cicd/test_script/crypto-gen.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash -ve
#! /bin/bash -ve

export NODE_ENV=development # testing development production
export NODE_ENV=production # testing development production
export BDK_NETWORK_NAME=shell-network-cryptogen
export DOCKER_LOGGING=true
export BDK_ORG_TYPE=peer

ORDERER_ORG_DOMAIN_BEN=$(jq --raw-output '.ordererOrgs[0].domain' ./cicd/test_script/network-create.json)
Expand Down
181 changes: 157 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,19 @@
"@types/sinon": "^9.0.8",
"@types/source-map-support": "^0.5.3",
"@types/string-format": "^2.0.0",
"@types/triple-beam": "^1.3.2",
"@types/yargs": "^15.0.5",
"ericlint": "^1.1.3",
"mocha": "^9.1.3",
"mocha-sonarqube-reporter": "^1.0.2",
"nodemon": "^2.0.4",
"nodemon": "^2.0.15",
"nyc": "^15.1.0",
"semver": "^7.3.5",
"sinon": "^9.2.0",
"source-map-support": "^0.5.19",
"ts-node": "^9.0.0",
"ts-node": "^10.4.0",
"typedoc": "^0.21.2",
"typescript": "^4.3"
"typescript": "^4.5.4"
},
"engines": {
"node": ">=12.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/command/chaincode/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const builder = (yargs: Argv<OptType>) => {
}

export const handler = async (argv: Arguments<OptType>) => {
logger.debug('[*] exec chaincode install')
logger.debug('exec chaincode install')

const chaincode = new Chaincode(config)

Expand Down
3 changes: 1 addition & 2 deletions src/command/chaincode/invoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ export const handler = async (argv: Arguments<OptType>) => {

const invokeResult = await chaincode.invoke(invokeChannelInput)
if (!('stdout' in invokeResult)) {
logger.error('command only for docker infra')
throw new Error('command only for docker infra')
}
logger.info(`invoke result =>\n${JSON.stringify(Chaincode.parser.invoke(invokeResult))}`)
logger.info(`${JSON.stringify(Chaincode.parser.invoke(invokeResult))}`)
}
3 changes: 1 addition & 2 deletions src/command/chaincode/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export const handler = async (argv: Arguments<OptType>) => {

const queryResult = await chaincode.query(queryChannelInput)
if (!('stdout' in queryResult)) {
logger.error('command only for docker infra')
throw new Error('command only for docker infra')
}
logger.info(`query result =>\n${JSON.stringify(Chaincode.parser.query(queryResult))}`)
logger.info(`${JSON.stringify(Chaincode.parser.query(queryResult))}`)
}
2 changes: 1 addition & 1 deletion src/command/config/ls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export const handler = () => {

const envConfig = configService.ls()

logger.info(`current .env config =>\n${JSON.stringify(envConfig)}`)
logger.info(`${JSON.stringify(envConfig)}`)
}
Loading