Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Don't set logging level when used as a library

Aberta
#232 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
backend, cli

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

type: feature

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

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de lepture/python-livereload

Todas as issues de lepture/python-livereload

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.