Skip to content
Open
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
1 change: 1 addition & 0 deletions src/f0cal/core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def _top_level_args(parser):
# # parser.add_argument('-f0o', '--f0cal-config-override', action='append')
parser.add_argument("-j", "--json", action="store_true", help="Output in json format instead of human-readable")
parser.add_argument("-c", "--core", default=f0cal.core.CORE)
parser.add_argument("-v", "--verbose", action="store_true", help="Print debugging output")

def main():
f0cal.core.CORE.scanner.scan("f0cal")
Expand Down
13 changes: 13 additions & 0 deletions src/f0cal/core/helpers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import os

import jinja2 as j2
Expand Down Expand Up @@ -28,3 +29,15 @@ def from_template_path(cls, template_path):
dir_path, template_name = os.path.split(template_path)
dir_path = os.path.abspath(dir_path)
return cls(dir_path, template=template_name)


logging.basicConfig(format='%(levelname)s:%(asctime)s: %(message)s')
def create_client_log(name, verbose=False):
if verbose:
level = logging.DEBUG
else:
level = logging.WARNING

logger = logging.getLogger(name)
logger.setLevel(level)
return logger