Add basic request logging functionality (#178)

This commit is contained in:
Daniel Kezerashvili
2018-04-01 23:36:49 -04:00
committed by Roman Shtylman
parent 14cac6f6c8
commit 32fd1fdcbd
3 changed files with 23 additions and 1 deletions

View File

@@ -70,13 +70,14 @@ Tunnel.prototype._init = function(cb) {
Tunnel.prototype._establish = function(info) {
var self = this;
var opt = self._opt;
// increase max event listeners so that localtunnel consumers don't get
// warning messages as soon as they setup even one listener. See #71
self.setMaxListeners(info.max_conn + (EventEmitter.defaultMaxListeners || 10));
info.local_host = opt.local_host;
info.local_port = opt.port;
info.debug_logs = opt.debug_logs;
var tunnels = self.tunnel_cluster = TunnelCluster(info);