From 37021a48c0eca3a3528cddb0f07e185f9343dd7e Mon Sep 17 00:00:00 2001 From: Nathan Denny Date: Tue, 3 Sep 2024 21:24:23 -0400 Subject: [PATCH] removed the 'as_' conversion functions --- lib/Bastion/Site.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/Bastion/Site.py b/lib/Bastion/Site.py index e92cc50..aa307eb 100644 --- a/lib/Bastion/Site.py +++ b/lib/Bastion/Site.py @@ -22,20 +22,6 @@ DEFAULT_LOGGING_PATH = pathlib.Path("/var/log/bastion") -def asLogLevel(x): - if isinstance(x, int): - return x - elif isinstance(x, str): - x = x.upper() - if x in ['DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']: - return getattr(logging, x) - raise ValueError("asLogLevel - cannot interpret '{}' as a log level.".format(x)) - - -def asPath(x): - return pathlib.Path(x) - - class canConfigure: """ Trait for objects that can configure themselves from a nested dictionary. @@ -75,7 +61,7 @@ def __init__(self, name): self.logging = Thing() self.logging.level = logging.WARN - self.logging.path = pathlib.Path("/var/log/bastion") + self.logging.path = pathlib.Path("/var/log/bastion/{}".format(self.name)) self.logging.persistence = None self.policy = RetentionPolicy()