1. Eric Larson
  2. eggmonster


Jason R. Coombs  committed 0e78ae6

Moved logger.default_port to eggmonster.logger_port to avoid import of logger module.

  • Participants
  • Parent commits 880d8d2
  • Branches em4
  • Tags 4.4.1

Comments (0)

Files changed (4)

File eggmonster/__init__.py

View file
 __version__ = '.'.join(str(x) for x in __version_info__)
 del __pkg__
+logger_port = 13000
 # copied from jaraco.util.dictlib
 class ItemsAsAttributes(object):

File eggmonster/commands/monster_logd.py

View file
 import sys
 import optparse
-from eggmonster import logger
+import eggmonster.logger
 def get_option_parser():
     op = optparse.OptionParser()
         help="Do not prefix log lines with timestamps",
     op.add_option("-p", "--port",
-        type="int", dest="port", default=logger.default_port, metavar="PORT",
-        help="Listen on port PORT",
+        type="int", dest="port", default=eggmonster.logger_port,
+        metavar="PORT", help="Listen on port PORT",
     return op
     basedir = args[0]
-    from eggmonster import logger
-    logger.main(basedir, options)
+    eggmonster.logger.main(basedir, options)

File eggmonster/internal_log.py

View file
 import os
 import socket
-from eggmonster import logger
+import eggmonster
 def get_host():
     env_host = os.environ.get('EGGMONSTER_LOG_HOST')
     if env_host:
         host, sep, port = env_host.partition(':')
-        port = int(port) if port else logger.default_port
+        port = int(port) if port else eggmonster.logger_port
             host = 'eggmonster-log'
-            port = logger.default_port
+            port = eggmonster.logger_port
         except socket.gaierror:
             return None
     return host, port

File eggmonster/logger.py

View file
 from datetime import datetime
 import os
-default_port = 13000
 class Logger(object):
     def __init__(self, d, write_timestamp=True):
         self.base = d