Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(service-logging): show socket creating
Browse files Browse the repository at this point in the history
  • Loading branch information
felix committed Oct 15, 2019
1 parent 14fa5a1 commit 707d9e9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions gnes/service/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,19 @@ def _run(self, ctx):
self.logger.info('bind sockets...')
in_sock, _ = build_socket(ctx, self.args.host_in, self.args.port_in, self.args.socket_in,
self.args.identity)
self.logger.info('input %s:%s' % (self.args.host_in, colored(self.args.port_in, 'yellow')))

out_sock, _ = build_socket(ctx, self.args.host_out, self.args.port_out, self.args.socket_out,
self.args.identity)
ctrl_sock, ctrl_addr = build_socket(ctx, self.default_host, self.args.port_ctrl, SocketType.PAIR_BIND)
self.logger.info('output %s:%s' % (self.args.host_out, colored(self.args.port_out, 'yellow')))

self.logger.info(
'input %s:%s\t output %s:%s\t control over %s' % (
self.args.host_in, colored(self.args.port_in, 'yellow'),
self.args.host_out, colored(self.args.port_out, 'yellow'),
colored(ctrl_addr, 'yellow')))
ctrl_sock, ctrl_addr = build_socket(ctx, self.default_host, self.args.port_ctrl, SocketType.PAIR_BIND)
self.logger.info('control over %s' % (colored(ctrl_addr, 'yellow')))
# self.logger.info(
# 'input %s:%s\t output %s:%s\t control over %s' % (
# self.args.host_in, colored(self.args.port_in, 'yellow'),
# self.args.host_out, colored(self.args.port_out, 'yellow'),
# colored(ctrl_addr, 'yellow')))

poller = zmq.Poller()
poller.register(in_sock, zmq.POLLIN)
Expand Down

0 comments on commit 707d9e9

Please sign in to comment.