Skip to content

Commit

Permalink
fix(tools): update formatting tool to accomodate new debug style
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Feb 16, 2016
1 parent b7558b4 commit b4c9567
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/formatDebugLog.js
Expand Up @@ -13,7 +13,7 @@ var debugOutputFile = process.argv[2];
var tryToConvert = true;

var rxPrefix = 'amqp10:connection Rx:';
var txPrefix = 'amqp10:framing Sending frame:';
var txPrefix = 'amqp10:framing sending frame:';

function s(cnt) {
var r = '';
Expand Down Expand Up @@ -178,9 +178,9 @@ fs.readFile(debugOutputFile, function (err, data) {
idxOfPrefix = line.indexOf(txPrefix);
if (idxOfPrefix >= 0) {
var rest = line.substr(idxOfPrefix + txPrefix.length + 1).trim();
var idxOfHexStart = rest.indexOf('}: ');
var idxOfHexStart = rest.indexOf('] : ');
if (idxOfHexStart >= 0) {
var curTxHex = rest.substr(idxOfHexStart + '}: '.length);
var curTxHex = rest.substr(idxOfHexStart + '] : '.length);
if (curTxHex.indexOf(' +') !== -1) {
curTxHex = curTxHex.substr(0, curTxHex.indexOf(' +'));
}
Expand Down

0 comments on commit b4c9567

Please sign in to comment.