Skip to content

Commit

Permalink
added asPath casting function used in getting logging.path
Browse files Browse the repository at this point in the history
  • Loading branch information
ndenny committed Jun 4, 2024
1 parent ec58699 commit b679be6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Bastion/Site.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def asLogLevel(x):
raise ValueError("asLogLevel - cannot interpret '{}' as a log level.".format(x))


def asPath(x):
return pathlib.Path(x)


class canConfigure:
"""
Expand Down Expand Up @@ -111,6 +114,7 @@ def configured(self, conf):

if 'logging' in condex:
self.logging.level = condex.get(asLogLevel, 'logging.level', logging.WARN)
self.logging.path = condex.get(asPath, 'logging.path', self.logging.path)

if 'policy' in condex:
self.policy = RetentionPolicy(condex['policy'])
Expand Down

0 comments on commit b679be6

Please sign in to comment.