Permalink
Browse files

ext-hub trace every ora data more clear,count glo

  • Loading branch information...
1 parent 0b9d321 commit 45c4e7d3fb09d431157eb36b0522b686835fe298 @kaven276 committed Oct 9, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/ext_hub.js
View
@@ -52,13 +52,15 @@ function gracefulQuit(){
// todo: should let oracle to send quit alert first
utl.gracefulExit(gracefulQuit);
+/** @define {int} */
+var onDataCount = 0;
+
var server = net.createServer(function(oraSock){
logConnOra('oracle connected');
- /** @define {int} */
- var onDataCount = 0;
+
oraSock.on('data', function(data){
- logConnOra('data arrived from oracle NO.%d len=%d', ++onDataCount, data.length);
+ logConnOra('NO.%d data arrived from oracle(%d,%d) len=%d', oraSock.sid || 0, oraSock.serial || 0, ++onDataCount, data.length);
});
var sid, serial;

0 comments on commit 45c4e7d

Please sign in to comment.