Code Monkey home page Code Monkey logo

Comments (4)

ywu94 avatar ywu94 commented on June 12, 2024 1

That makes sense, will remove the dependencies in next version.

from python-text-distance.

ywu94 avatar ywu94 commented on June 12, 2024

Thanks for the suggestion. The reason for having a logging config file is to make it easy to control logging for all modules in one place so I think we should keep the logger config file.

However logging also supports json as its config file so one workaround will be to rewrite the logging config file into a json which can be read using Python built-in library.

from python-text-distance.

notpushkin avatar notpushkin commented on June 12, 2024

I still think it should be the apps authors responsibility. Config file is not the best option for everybody. e. g.:

  • a CLI tool might want to vary its config settings based on how many -v switches it got
  • a GUI application might log into its UI and allow users to change logging settings on the fly
  • a Twelve-Factor proponent could prefer to store the whole config in the environment – not that it makes too much sense if there are two or three deploy variations, but some people do that :)

I'd say this code

with open(logger_config_yaml_path, "rt") as f:
    config = yaml.safe_load(f.read())
logging.config.dictConfig(config)

belongs in the application itself as it's way too specific.

from python-text-distance.

ywu94 avatar ywu94 commented on June 12, 2024

Changes made per suggested, thanks again for suggestion.

from python-text-distance.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.