"""
tagversion Entrypoints
"""
import logging
import sys

from tagversion.argparse import ArgumentParser
from tagversion.git import GitVersion
from tagversion.write import WriteFile


def main():
    logging.basicConfig(level=logging.WARNING)

    parser = ArgumentParser()
    subcommand = parser.add_subparsers(dest='subcommand')

    GitVersion.setup_subparser(subcommand)
    WriteFile.setup_subparser(subcommand)

    args = parser.parse_args(default_subparser='version')

    command = args.cls(args)
    sys.exit(command.run())

@@ -39,16 +39,26 @@
 logging%0A
+import os%0A
 import s
@@ -186,16 +186,68 @@
 teFile%0A%0A
+LOG_LEVEL = os.environ.get('LOG_LEVEL', 'warning')%0A%0A
 %0Adef mai
@@ -285,23 +285,43 @@
 vel=
-logging.WARNING
+getattr(logging, LOG_LEVEL.upper())
 )%0A%0A 

Allow log level to be changed via environment variable