Skip to content
Permalink
Browse files

fix(service-logging): show socket creating

  • Loading branch information...
numb3r3 committed Oct 15, 2019
1 parent 14fa5a1 commit 707d9e96fdc3ffdfdbaa920af1dd8e9d47be4b27
Showing with 10 additions and 6 deletions.
  1. +10 −6 gnes/service/base.py
@@ -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)

0 comments on commit 707d9e9

Please sign in to comment.
You can’t perform that action at this time.