Skip to content

Commit 54ab3f6

Browse files
committed
Fixed commented log msgs.
1 parent e234555 commit 54ab3f6

File tree

15 files changed

+46
-48
lines changed

15 files changed

+46
-48
lines changed

src/admin/client.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class DisplayOrder {
7676

7777
public submit = () => {
7878
var msg = new Models.OrderRequestFromUI(this.side, this.price, this.quantity, this.timeInForce, this.orderType);
79-
// this._log.info("submitting order", msg);
79+
this._log.info("submitting order", msg);
8080
this._fire.fire(msg);
8181
};
8282
}
@@ -100,7 +100,7 @@ var uiCtrl = ($scope : MainWindowScope,
100100
$scope.pair = null;
101101

102102
var onAdvert = (pa : Models.ProductAdvertisement) => {
103-
// $log.info("advert", pa);
103+
$log.info("advert", pa);
104104
$scope.connected = true;
105105
$scope.env = pa.environment;
106106
$scope.pair_name = Models.Currency[pa.pair.base] + "/" + Models.Currency[pa.pair.quote];
@@ -109,7 +109,7 @@ var uiCtrl = ($scope : MainWindowScope,
109109
};
110110

111111
var reset = (reason : string) => {
112-
// $log.info("reset", reason);
112+
$log.info("reset", reason);
113113
$scope.connected = false;
114114
$scope.pair_name = null;
115115
$scope.exch_name = null;
@@ -126,10 +126,10 @@ var uiCtrl = ($scope : MainWindowScope,
126126

127127
$scope.$on('$destroy', () => {
128128
sub.disconnect();
129-
// $log.info("destroy client");
129+
$log.info("destroy client");
130130
});
131131

132-
// $log.info("started client");
132+
$log.info("started client");
133133
};
134134

135135
var requires = ['ui.bootstrap',

src/admin/market-quoting.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ var MarketQuotingController = ($scope: MarketQuotingScope,
182182

183183
$scope.$on('$destroy', () => {
184184
subscribers.forEach(d => d.disconnect());
185-
// $log.info("destroy market quoting grid");
185+
$log.info("destroy market quoting grid");
186186
});
187187

188-
// $log.info("started market quoting grid");
188+
$log.info("started market quoting grid");
189189
};
190190

191191
export var marketQuotingDirective = "marketQuotingDirective";

src/admin/market-trades.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ var MarketTradeGrid = ($scope: MarketTradeScope,
108108

109109
$scope.$on('$destroy', () => {
110110
sub.disconnect();
111-
// $log.info("destroy market trade grid");
111+
$log.info("destroy market trade grid");
112112
});
113113

114-
// $log.info("started market trade grid");
114+
$log.info("started market trade grid");
115115
};
116116

117117
export var marketTradeDirective = "marketTradeDirective";

src/admin/messages.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ var MessagesController = ($scope: MessageLoggerScope, $log: ng.ILogService, subs
5252

5353
$scope.$on('$destroy', () => {
5454
sub.disconnect();
55-
// $log.info("destroy message grid");
55+
$log.info("destroy message grid");
5656
});
5757

58-
// $log.info("started message grid");
58+
$log.info("started message grid");
5959
};
6060

6161
export var messagesDirective = "messagesDirective";

src/admin/orderlist.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ var OrderListController = ($scope: OrderListScope,
146146

147147
$scope.$on('$destroy', () => {
148148
sub.disconnect();
149-
// $log.info("destroy order list");
149+
$log.info("destroy order list");
150150
});
151151

152-
// $log.info("started order list");
152+
$log.info("started order list");
153153
};
154154

155155
var orderList = (): ng.IDirective => {

src/admin/position.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ var PositionController = ($scope : PositionScope, $log : ng.ILogService, subscri
5252

5353
$scope.$on('$destroy', () => {
5454
positionSubscriber.disconnect();
55-
// $log.info("destroy position grid");
55+
$log.info("destroy position grid");
5656
});
5757

58-
// $log.info("started position grid");
58+
$log.info("started position grid");
5959
};
6060

6161
export var positionDirective = "positionDirective";

src/admin/target-base-position.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ var TargetBasePositionController = ($scope : TargetBasePositionScope, $log : ng.
2828

2929
$scope.$on('$destroy', () => {
3030
subscriber.disconnect();
31-
// $log.info("destroy target base position");
31+
$log.info("destroy target base position");
3232
});
3333

34-
// $log.info("started target base position");
34+
$log.info("started target base position");
3535
};
3636

3737
export var targetBasePositionDirective = "targetBasePositionDirective";

src/admin/trade-safety.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ var TradeSafetyController = ($scope : TradeSafetyScope, $log : ng.ILogService, s
4444

4545
$scope.$on('$destroy', () => {
4646
subscriber.disconnect();
47-
// $log.info("destroy trade safety");
47+
$log.info("destroy trade safety");
4848
});
4949

50-
// $log.info("started trade safety");
50+
$log.info("started trade safety");
5151
};
5252

5353
export var tradeSafetyDirective = "tradeSafetyDirective";

src/admin/trades.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ var TradesListController = ($scope : TradesScope, $log : ng.ILogService, subscri
158158
$scope.$on('$destroy', () => {
159159
sub.disconnect();
160160
qpSub.disconnect();
161-
// $log.info("destroy trades list");
161+
$log.info("destroy trades list");
162162
});
163163

164-
// $log.info("started trades list");
164+
$log.info("started trades list");
165165
};
166166

167167
var tradeList = () : ng.IDirective => {

src/common/messaging.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ export class Publisher<T> implements IPublish<T> {
2323
this.registerSnapshot(snapshot || null);
2424

2525
var onConnection = s => {
26-
// this._log("socket", s.id, "connected for Publisher", topic);
26+
this._log("socket", s.id, "connected for Publisher", topic);
2727

28-
// s.on("disconnect", () => {
29-
// this._log("socket", s.id, "disconnected for Publisher", topic);
30-
// });
28+
s.on("disconnect", () => {
29+
this._log("socket", s.id, "disconnected for Publisher", topic);
30+
});
3131

3232
s.on(Prefixes.SUBSCRIBE + "-" + topic, () => {
3333
if (this._snapshot !== null) {
3434
var snapshot = this._snapshot();
35-
// this._log("socket", s.id, "asking for snapshot on topic", topic);
35+
this._log("socket", s.id, "asking for snapshot on topic", topic);
3636
s.emit(Prefixes.SNAPSHOT + "-" + topic, snapshot);
3737
}
3838
});
@@ -84,7 +84,7 @@ export class Subscriber<T> implements ISubscribe<T> {
8484
private _log : (...args: any[]) => void) {
8585
this._socket = io;
8686

87-
// this._log("creating subscriber to", this.topic, "; connected?", this.connected);
87+
this._log("creating subscriber to", this.topic, "; connected?", this.connected);
8888

8989
if (this.connected)
9090
this.onConnect();
@@ -100,7 +100,7 @@ export class Subscriber<T> implements ISubscribe<T> {
100100
}
101101

102102
private onConnect = () => {
103-
// this._log("connect to", this.topic);
103+
this._log("connect to", this.topic);
104104
if (this._connectHandler !== null) {
105105
this._connectHandler();
106106
}
@@ -109,7 +109,7 @@ export class Subscriber<T> implements ISubscribe<T> {
109109
};
110110

111111
private onDisconnect = () => {
112-
// this._log("disconnected from", this.topic);
112+
this._log("disconnected from", this.topic);
113113
if (this._disconnectHandler !== null)
114114
this._disconnectHandler();
115115
};
@@ -120,13 +120,13 @@ export class Subscriber<T> implements ISubscribe<T> {
120120
};
121121

122122
private onSnapshot = (msgs : T[]) => {
123-
// this._log("handling snapshot for", this.topic, "nMsgs:", msgs.length);
123+
this._log("handling snapshot for", this.topic, "nMsgs:", msgs.length);
124124
if (this._snapshotHandler !== null)
125125
this._snapshotHandler(msgs);
126126
};
127127

128128
public disconnect = () => {
129-
// this._log("forcing disconnection from ", this.topic);
129+
this._log("forcing disconnection from ", this.topic);
130130
this._socket.off("connect", this.onConnect);
131131
this._socket.off("disconnect", this.onDisconnect);
132132
this._socket.off(Prefixes.MESSAGE + "-" + this.topic, this.onIncremental);
@@ -183,8 +183,8 @@ export class Fire<T> implements IFire<T> {
183183

184184
constructor(private topic : string, io : SocketIOClient.Socket, _log : (...args: any[]) => void) {
185185
this._socket = io;
186-
// this._socket.on("connect", () => _log("Fire connected to", this.topic))
187-
// .on("disconnect", () => _log("Fire disconnected to", this.topic));
186+
this._socket.on("connect", () => _log("Fire connected to", this.topic))
187+
.on("disconnect", () => _log("Fire disconnected to", this.topic));
188188
}
189189

190190
public fire = (msg : T) : void => {
@@ -205,14 +205,14 @@ export class Receiver<T> implements IReceive<T> {
205205
constructor(private topic : string, io : SocketIO.Server,
206206
private _log : (...args: any[]) => void) {
207207
var onConnection = (s : SocketIO.Socket) => {
208-
// this._log("socket", s.id, "connected for Receiver", topic);
208+
this._log("socket", s.id, "connected for Receiver", topic);
209209
s.on(Prefixes.MESSAGE + "-" + this.topic, msg => {
210210
if (this._handler !== null)
211211
this._handler(msg);
212212
});
213-
// s.on("error", e => {
214-
// _log("error in Receiver", e.stack, e.message);
215-
// });
213+
s.on("error", e => {
214+
_log("error in Receiver", e.stack, e.message);
215+
});
216216
};
217217

218218
io.on("connection", onConnection);

0 commit comments

Comments
 (0)