Don't set logging level when used as a library
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
Direção de pesquisa
Start at Server.serve and Server._setup_logging, then compare how logging is configured in cli.py. Keep library use from changing application and dependency loggers, while preserving the CLI's intended logging behavior; verify the affected server and CLI paths manually or with the repository's existing tests.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Server.serve calls Server._setup_logging which explicitly sets the logging level to INFO and hooks up the tornado logger to the output too.
As a user of a library, I should be able to be in control about what gets printed to the screen of my app and what dependencies of mine log to where.
I can fix this by monkey-patching the code with:
server = Server()
server._setup_logging = lambda: None
server.serve(root=".")
but I think that by default the library should not alter the loggers and they should instead be set in cli.py, allowing the CLI experience to be nice but giving library users the flexibility to set things how they wish.
- Linguagem predominante
- Python
- Estrelas
- 1.1k
- Forks
- 148
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de lepture/python-livereload
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 70/100
lepture/python-livereload#159 · 3 reações ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
lepture/python-livereload#288 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 38/100
lepture/python-livereload#283 · 1 comentário ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
lepture/python-livereload#282 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
lepture/python-livereload#279 ·
Todas as issues de lepture/python-livereload
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Clean up dependabot noiseAbertaTask
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
war-and-code/dircue#200 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 87/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia