Loading README.md +1 −1 Original line number Diff line number Diff line Loading @@ -43,6 +43,6 @@ Dependencies for the generated python project: ## License Copyright © 2014-2019 Yuanle Song <sylecn@gmail.com> Copyright © 2014-2019,2024 Yuanle Song <sylecn@gmail.com> This project is licensed under the Apache License 2.0. project.clj +1 −1 Original line number Diff line number Diff line (defproject python/lein-template "3.0.0" (defproject python/lein-template "3.0.1" :description "lein template for a python project" :url "https://gitlab.emacsos.com/sylecn/python-project-template" :license {:name "Apache License 2.0" Loading src/leiningen/new/python/configlogger.py +3 −6 Original line number Diff line number Diff line #!/usr/bin/env python2 #!/usr/bin/env python3 # coding=utf-8 """ config logger """ from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) import os.path import logging from logging.config import fileConfig from pkg_resources import resource_filename from importlib.resources import files def load_logger_config(): Loading @@ -25,7 +22,7 @@ def load_logger_config(): """ logdir = "/var/log/{{name}}/" if os.path.exists(logdir): fileConfig(resource_filename("{{python-pkg-name}}", "logger.conf")) fileConfig(files("{{python-pkg-name}}").joinpath("logger.conf")) return ENV = os.getenv("ENV", "test") Loading Loading
README.md +1 −1 Original line number Diff line number Diff line Loading @@ -43,6 +43,6 @@ Dependencies for the generated python project: ## License Copyright © 2014-2019 Yuanle Song <sylecn@gmail.com> Copyright © 2014-2019,2024 Yuanle Song <sylecn@gmail.com> This project is licensed under the Apache License 2.0.
project.clj +1 −1 Original line number Diff line number Diff line (defproject python/lein-template "3.0.0" (defproject python/lein-template "3.0.1" :description "lein template for a python project" :url "https://gitlab.emacsos.com/sylecn/python-project-template" :license {:name "Apache License 2.0" Loading
src/leiningen/new/python/configlogger.py +3 −6 Original line number Diff line number Diff line #!/usr/bin/env python2 #!/usr/bin/env python3 # coding=utf-8 """ config logger """ from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) import os.path import logging from logging.config import fileConfig from pkg_resources import resource_filename from importlib.resources import files def load_logger_config(): Loading @@ -25,7 +22,7 @@ def load_logger_config(): """ logdir = "/var/log/{{name}}/" if os.path.exists(logdir): fileConfig(resource_filename("{{python-pkg-name}}", "logger.conf")) fileConfig(files("{{python-pkg-name}}").joinpath("logger.conf")) return ENV = os.getenv("ENV", "test") Loading