Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jason's LogMustFall #685

Merged
merged 1 commit into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions bin/stimela
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ import stimela.main as main

# Ensure that logging infrastructure exists

if not os.path.exists(stimela.LOG_HOME):
os.mkdir(stimela.LOG_HOME)

main.main([a for a in sys.argv[1:]])
6 changes: 0 additions & 6 deletions stimela/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
CAB_PATH = os.path.join(root, "cargo/cab")
BASE_PATH = os.path.join(root, "cargo/base")

# Set up logging infrastructure
LOG_HOME = os.path.expanduser("~/.stimela")
# make sure directory exists
Path(LOG_HOME).mkdir(exist_ok=True)
# This is is the default log file. It logs stimela images, containers and processes
LOG_FILE = "{0:s}/stimela_logfile.json".format(LOG_HOME)

GLOBALS = {'foo': 'bar'}
del GLOBALS['foo']
Expand Down
7 changes: 0 additions & 7 deletions stimela/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ def __init__(self, image, name,
self.PID = os.getpid()
self.uptime = "00:00:00"
self.time_out = time_out
self.cont_logger = utils.logger.StimelaLogger(
log_container or stimela.LOG_FILE, jtype="docker")

def add_volume(self, host, container, perm="rw", noverify=False):

Expand Down Expand Up @@ -160,8 +158,6 @@ def start(self, output_wrangler=None):
tstart = time.time()
self.status = "running"

self.cont_logger.log_container(self.name)
self.cont_logger.write()
self._print("Starting container [{0:s}]. Timeout set to {1:d}. The container ID is printed below.".format(
self.name, self.time_out))
utils.xrun("docker", ["start", "-a", self.name],
Expand Down Expand Up @@ -220,9 +216,6 @@ def remove(self):
raise DockerError(
"Container [{}] has not been stopped, cannot remove".format(self.name))

self.cont_logger.remove('containers', self.name)
self.cont_logger.write()

def _print(self, message):
if self.logger:
self.logger.info(message)
Expand Down
Loading