Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
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
4 changes: 2 additions & 2 deletions packages/composer-common/lib/connectionprofilemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class ConnectionProfileManager {
connectionManager = new(curmod.require(mod))(this);
break;
} catch (e) {
LOG.error(METHOD,'No yet located the module ',e.message);
LOG.info(METHOD,'No yet located the module ',e.message);
// Continue to search the parent.
}
curmod = curmod.parent;
Expand All @@ -134,7 +134,7 @@ class ConnectionProfileManager {
return true;
} catch (e) {
// Search the next one.
LOG.debug(METHOD,e);
LOG.info(METHOD,e);
return false;
}
});
Expand Down
6 changes: 3 additions & 3 deletions packages/composer-common/lib/log/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,9 @@ class Logger {
},
'file': {

'filename': 'trace_PID.log',
'enabledLevel': 'silly',
'alwaysLevel': 'info'
'filename': 'trace_TIMESTAMP.log',
'enabledLevel': 'debug',
'alwaysLevel': 'error'
}
}};

Expand Down
8 changes: 7 additions & 1 deletion packages/composer-common/lib/log/winstonInjector.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ exports.getLogger = function (config,configElements){

// process the file name and make sure the directory has been created
let resolvedFilename = config.file.filename.replace(/PID/g, process.pid);
let dir = './logs';

// process the filename and get the timestampe replaced
let d = new Date();
let timestamp = sprintf('%d%02d%02d-%02d%02d%02d-%03d',d.getUTCFullYear(),d.getUTCMonth()+1,d.getUTCDate()+1,d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds());
resolvedFilename = resolvedFilename.replace(/TIMESTAMP/g, timestamp);

let dir = './composer-logs';
fs.ensureDirSync(dir);

// create the Winston logger with the two transports.
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-connector-hlfv1/lib/hlfconnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ class HLFConnection extends Connection {
})
.then(() => {
let txId = this.client.newTransactionID();

// This is evil! I shouldn't need to set GOPATH in a node.js program.
process.env.GOPATH = tempDirectoryPath;

Expand Down Expand Up @@ -739,7 +740,6 @@ class HLFConnection extends Connection {

let txId = this.client.newTransactionID();


// Submit the query request.
const request = {
chaincodeId: this.businessNetworkIdentifier,
Expand Down